Thanks Vineeth for your answer. I will give it a shot.

On Thursday, November 6, 2014 3:24:28 PM UTC+5:30, vineeth mohan wrote:
>
> Helli Vijay , 
>
> I cant think of any straight and efficient way to implement this.
> But then you can write your own map reduce script ( Feature in 1.4.0) to 
> gather this information - 
> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-scripted-metric-aggregation.html
>
> Thanks
>           Vineeth
>
> On Tue, Nov 4, 2014 at 10:30 AM, vijay karmani <vijay....@gmail.com 
> <javascript:>> wrote:
>
>> I've document structure like 
>>
>> {
>> username : abc
>> login_timestamp : 2014-04-11 11:05:00 AM
>> logout_timestamp : 2014-04-11   11:30:00 AM
>> },
>>
>> {
>> username : def
>> login_timestamp : 2014-04-11 11:15:00 AM
>> logout_timestamp : 2014-04-11   11:45:00 AM
>> } , 
>>
>> {
>> username : xyz
>> login_timestamp : 2014-04-11 12:10:00 PM
>> logout_timestamp : 2014-04-11   01:15:00 PM
>> } 
>>
>>
>> I would like to calculate number of concurrent user sessions for a given 
>> date. For example if login_timestamp/logout_timestamp of one user overlaps 
>> with login_timestamp/logout_timestamp of other user then they are said to 
>> have concurrent session and in above example, users *abc* and *def* are 
>> having concurrent sessions. Hence output should have 2 against 2014-04-11 
>> date.
>>
>> Is it possible in es and if so then can anybody help to form a query for 
>> this?
>>
>> Thanks
>> Vijay
>>
>>  -- 
>> 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 elasticsearc...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elasticsearch/84a9e732-5f1b-4480-ab55-e95789813d6f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/elasticsearch/84a9e732-5f1b-4480-ab55-e95789813d6f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/4d2bad52-85cc-4f33-a67b-81235d42bf4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to