You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Alisa Z." <pr...@mail.ru> on 2016/03/25 19:12:28 UTC

Re[2]: [nesting] Any way to return the whole hierarchical structure when doing Block Join queries?

 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 <mk...@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. < proloxx@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 >
>< mkhludnev@griddynamics.com >


Re: Re[2]: [nesting] Any way to return the whole hierarchical structure when doing Block Join queries?

Posted by Anshum Gupta <an...@anshumgupta.net>.
Hi Alisa,

The issue here is still open so it seems highly unlikely that it would even
get to 6.0, which is around the corner. I think this would only be out with
6.1 at the earliest.

On Fri, Mar 25, 2016 at 11:12 AM, Alisa Z. <pr...@mail.ru> wrote:

>  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 <
> mkhludnev@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. < proloxx@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 >
> >< mkhludnev@griddynamics.com >
>
>


-- 
Anshum Gupta