Hey, thats not possible with one query on the top of my head, but should work with two queries:
1. Execute your query for data_line and facet on group_id with a huge size 2. For each result returned in the facet, execute a query. Group these queries in a multi search Hope this helps... maybe you can save queries by changing the data structure. --Alex On Thu, Dec 19, 2013 at 12:59 PM, Boris Kogan <[email protected]> wrote: > Hi, All > > Please help with the following problem: > The data is in the following form: > { > "id": <number> > "group_id":<number>, > "data_line": "<string>" > } > > I would like to get all data items with the same group_id if at least one > of the data_line matches the query. > Is there any way to get results in single query? If now, what is preferred > way? > > > Thanks, > Boris > > > > > > > This message may contain confidential and/or privileged information. > If you are not the addressee or authorized to receive this on behalf of > the addressee you must not use, copy, disclose or take action based on this > message or any information herein. > If you have received this message in error, please advise the sender > immediately by reply email and delete this message. Thank you. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/09385955-729f-43fd-96d9-987e0b0af75c%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-kLfzKRSxpXZxr7ZWP0p1Bo_HfLMPcZr%3DVMBLTAcbLHA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
