Complex nested aggregation query based on time

Hello there,

I am trying to write a rather complex aggregation

Let's say my json documents contains the following fields: timestamp,
username, subject

The search should return documents where:

  • two identical "subject" fields,
  • by the same username,
  • within an interval of X minutes.

Using nested aggregation I can group by username, and count the identical
subjects (terms).
However I can't find a way to also specify a time interval within the
query. (the identical subjects should be within an interval of X minutes)

All pointers are welcome.

Thanks
Christophe

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2f90d46f-2330-4a0f-8658-8cbdf6824415%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.