Mikhail, Thank you for the answer. I'd be happy to contribute tons of test cases on nested structures and their querying and faceting... I am working on a case of moving very nested data structures to Solr (and the other option is ES...) but so far Solr seems to be quite behind... It's great to see that it is moving in that direction though. I am happy to provide the use-cases (that are out of eCommerce actually) and publicly available test-cases.
Is it correct that the patch will appear in a release version no sooner than Solr 6.0 or even later? Thanks, Alisa >Четверг, 24 марта 2016, 15:52 -04:00 от Mikhail Khludnev ><mkhlud...@griddynamics.com>: > >I think you cal already kick tires and contribute a test case into >https://issues.apache.org/jira/browse/SOLR-8208 that's already reachable >there I believe, but I still working on core design. > >On Thu, Mar 24, 2016 at 10:02 PM, Alisa Z. < prol...@mail.ru > wrote: > >> Hi all, >> >> I apologize for duplicating my previous message: >> Solr 5.3: anything similar to ChildDocTransformerFactory that does not >> flatten the hierarchical structure? >> >> However, it is still an open and interesting question: >> >> Following the example from https://dzone.com/articles/using-solr-49-new >> , let's say we are given multiple-level nested structure: >> >> <doc> >> <field name="id">1</field> >> <field name="name">I am the parent</field> >> <field name="cat">PARENT</field> >> <doc> >> <field name="id">1.1</field> >> <field name="name">I am the 1st child</field> >> <field name="cat">CHILD</field> >> </doc> >> <doc> >> <field name="id">1.2</field> >> <field name="name">I am the 2nd child</field> >> <field name="cat">CHILD</field> >> <doc> >> <field name="id">1.2.1</field> >> <field name="name">I am a grandchildren</field> >> <field name="cat">GRANDCHILD</field> >> </doc> >> </doc> >> </doc> >> >> >> Querying >> q={!parent which="cat:PARENT"}name:(I am +child)&fl=id,name,[child >> parentFilter=cat:PARENT] >> >> will return flattened structure, where cat:CHILD and cat:GRANDCHILD >> documents end up on the same level: >> <doc> >> <field name="id">1</field> >> <field name="name">I am the parent</field> >> <field name="cat">PARENT</field> >> <doc> >> <field name="id">1.1</field> >> <field name="name">I am the 1st child</field> >> <field name="cat">CHILD</field> >> </doc> >> <doc> >> <field name="id">1.2</field> >> <field name="name">I am the 2nd child</field> >> <field name="cat">CHILD</field> >> </doc> >> <doc> >> <field name="id">1.2.1</field> >> <field name="name">I am a grandchildren</field> >> <field name="cat">GRANDCHILD</field> >> </doc> >> </doc> Indeed, the JAVAdocs for ChildDocTransformerFactory say: "This >> transformer returns all descendants of each parent document in a flat list >> nested inside the parent document". >> >> Yet is there any way to preserve the hierarchy in the response? I really >> need to find the way to preserve the structure in the response. >> >> Thank you in advance! >> >> -- >> Alisa Zhila >> ---------------------------------------------------------------------- >> > > > >-- >Sincerely yours >Mikhail Khludnev >Principal Engineer, >Grid Dynamics > >< http://www.griddynamics.com > >< mkhlud...@griddynamics.com >