Query to get documents having specific message and time difference between documents should not be more than 5 mins

Hi Team,

I want to get documents having specific messages and time difference between documents should not be more than 5 mins.

For eg.
I have documents with messages "abc" and "xyz" in any index.
Now I want to get all documents having message "abc" OR "xyz" AND time difference between these documents should not be more than 5 mins.

I have researched on this but did not find elastic search query to get such documents. Could you please help me with this ?

Thanks,
Piyush Srivastava

I don't believe you can do that: comparing the values between 2 different documents.

You probably need to think your model a bit differently if possible.
It depends on the use case I guess.

ok. Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.