This is usually something that's being solved using parent-child, but the question here really is what do you mean by needing to retrieve both books & pages.
Can you describe the actual scenario and what you are trying to achieve? -- Itamar Syn-Hershko http://code972.com | @synhershko <https://twitter.com/synhershko> Freelance Developer & Consultant Author of RavenDB in Action <http://manning.com/synhershko/> On Thu, Jun 19, 2014 at 7:12 PM, liorg <liorg...@gmail.com> wrote: > Hi, > > we have somehow a complex type holding some nested docs with arrays (lets > assume an hierarchy of books and for each book we have an array of pages > containing its metadata). > > we want to search for the nested doc - search for all the books that have > the term "XYZ" in one of their pages - but we want to get back not only the > book, but the pages themselves. > > We've understood that it's problematic to achieve with ES (see > https://github.com/elasticsearch/elasticsearch/issues/3022). > > We have a problem to achieve it with parent child model as the data model > comes from our mongodb already existing model (and besides, not sure if a > parent child model fits here). > > so... > > 1. Is there any a workaround we can do to get the results of the nested > doc? (the actual pages?) > 2. If not, is there a recommended way we can search for the data again in > memory after it was narrowed down by ES server?... > 3. Any advice will be appreciated as this is quite a big obstacle in our > way to implement a solution using ES. > > thanks, > > Lior > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/7602d608-5730-472e-8259-763ff29614ea%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/7602d608-5730-472e-8259-763ff29614ea%40googlegroups.com?utm_medium=email&utm_source=footer> > . > 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 elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zuks28fnRvh7%2BVkNU%3D205oytvppCs61PEAbwQJ-6%3Dn0kQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.