I'm not the best person to comment on this so perhaps someone could chime in as well, but can you try using a wildcard for your childFilter? Something like: childFilter=type_s:doc.enriched.text.*
You could also possibly enrich the document with depth information and use that for filtering out. On Wed, Mar 30, 2016 at 11:34 AM, Alisa Z. <prol...@mail.ru> wrote: > I think I am observing an unexpected behavior of > ChildDocTransformerFactory. > > The query is like this: > > /select?q={!parent which= "type_s:doc.enriched.text "}t > ype_s:doc.enriched.text.entities +text_t:pjm +type_t:Company > +relevance_tf:[0.7%20TO%20*]&fl=*,[child > parentFilter=type_s:doc.enriched.text limit=1000] > > The levels of hierarchy are shown in the type_s field. So I am querying > on some descendants and returning some ancestors that are somewhere in the > middle of the hierarchy. I also want to get all the nested documents > below that middle level. > > Here is the result: > > <result name =" response " numFound =" 3 " start =" 0 " > > <doc> > > <str name =" type_s " > doc.enriched.text </str> // this is the level > I wanted to get to and then go down from it > <arr name =" text_t " > ... </arr> > <str name =" id " > 13565 </str> > <doc> > <str name =" type_s " > doc.enriched </str> // This is a document > from 1 level up, the parent of the > // current type_s : > doc.enriched.text document -- why is it here? > <str name =" id " > 22024 </str> > </doc> > <doc> > <str name =" type_s " > doc.original </str> // This is an "uncle" > <str name =" id " > 26698 </str> > </doc> > <doc> > <str name =" type_s " > doc </str> // and this a > grandparent!!! > .... > </doc> > </doc> > > And so on, bringing the whole tree up and down all under my middle-level > document. > I really hope this is not the expected behavior. > > I appreciate your help in advance. > > -- > Alisa Zhila -- Anshum Gupta