How to query documents "grouped documents"

Hello. I have following documents:

  1. group:groupid1 status:passed message:somemessage
  2. group:groupid1 message:somemessage2
  3. group:groupid2 message:somemessage
  4. group:groupid1 message:somemessage3

I would like to get all documents which contains status:passed in their "group". So in this case #1, #2 and #4.

Probably I will also need to get all documents with no "status" field where there is some document in their group which contains status:passed. So #2 and #4 in this case.

Is it possible to make these ES queries? How?

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