If you are using Parent / Child feature, you should look at has_parent, has_child filters.
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-has-child-filter.html#query-dsl-has-child-filter In that case, you don't need to get back parent id yourself. If you are not using Parent / child, I'm afraid you need to run 2 queries. My 2 cents -- David ;-) Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs > Le 25 janv. 2015 à 05:44, bvnrwork <[email protected]> a écrit : > > Hi, > > can some one help me on this. > > have scenario where have Query1 which qualifies some documents and now I want > to take _parent id of qualified documents and search on _parentid field to > get the qualified documents and all others documents with same parent id > > .These two searches I want to do it in one single request , is it possible? > > Regards, > Nagaraju > -- > 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/a1946c82-7239-4e56-a082-ab11e66b4041%40googlegroups.com. > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/A4959B00-FB5F-4EAA-9304-5B2BCC490601%40pilato.fr. For more options, visit https://groups.google.com/d/optout.
