I am not sure that elasticsearch stores that kind of metadata about each
document. You could perform an update on the document every time you insert
to store the datetime that it was modified, then proceed with a date range
query.

http://www.elastic.co/guide/en/elasticsearch/reference/1.3/_updating_documents.html

-Christian

On Mon, May 11, 2015 at 2:47 PM, Aravind Chennuru <aryanarav...@gmail.com>
wrote:

> Hi All,
>
> I am kind of new to elasticsearch queries and I would like to get the
> information about the time since the last value change, in the following
> example the time the value is 1 = 5 seconds. Is there a way to do it, if
> no, can someone think of a way to achieve this?
>
> @timestamp: May 11th 2015, 14:35:43.708 Key: service1 values: 1
> @timestamp: May 11th 2015, 14:34:43.708 Key: service1 values: 1
> @timestamp: May 11th 2015, 14:33:43.708 Key: service1 values: 1
> @timestamp: May 11th 2015, 14:32:43.708 Key: service1 values: 1
> @timestamp: May 11th 2015, 14:31:43.708 Key: service1 values: 1
> @timestamp: May 11th 2015, 14:30:43.708 Key: service1 values: 0
>
> I am basically trying to figure out my application uptime from this data
> that we already have.
>
> Thanks & Regards,
> Aravind Chennuru
>
> --
> Please update your bookmarks! We have moved to https://discuss.elastic.co/
> ---
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/51a38df0-5719-490e-911c-17bc9b08883f%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/51a38df0-5719-490e-911c-17bc9b08883f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Please update your bookmarks! We have moved to https://discuss.elastic.co/
--- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CALsYvrwFaQYPG9gY%3DsYGr3FWZ0hDFFM7RYox4geThex3xFvdCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to