I guess the key question here is whether «parent» in BlockJoin is strictly 
top-level parent/root, i.e. class:composition for the example in this tread? Or 
can {!parent} parser also be used to select the «child» level in a 
child/grandchild relationship inside a block?

Jan

> 24. jun. 2020 kl. 11:36 skrev Tor-Magne Stien Hagen <t...@dips.no>:
> 
> Thanks for your answer,
> 
> What kind of rules exists for the which clause? In other words, how can you 
> identify parents without using some sort of filtering?
> 
> Tor-Magne Stien Hagen
> 
> -----Original Message-----
> From: Mikhail Khludnev <m...@apache.org> 
> Sent: Wednesday, June 24, 2020 10:01 AM
> To: solr-user <solr-user@lucene.apache.org>
> Subject: Re: Unexpected results using Block Join Parent Query Parser
> 
> Hello,
> 
> Please check warning box titled Using which
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flucene.apache.org%2Fsolr%2Fguide%2F8_5%2Fother-parsers.html%23block-join-parent-query-parser&amp;data=02%7C01%7Ctsh%40dips.no%7C5fef4e9a68cc41c72fd208d81814e93e%7C2f46c9197c11446584b2e354fb809979%7C0%7C0%7C637285825378470570&amp;sdata=rB356EBZuDmFsTHT3ULcvr47zCcr%2F29XYaGA7%2BJ5HrI%3D&amp;reserved=0
> 
> On Wed, Jun 24, 2020 at 10:01 AM Tor-Magne Stien Hagen <t...@dips.no> wrote:
> 
>> Hi,
>> 
>> I have indexed the following nested document in Solr:
>> 
>> {
>>    "id": "1",
>>    "class": "composition",
>>    "children": [
>>        {
>>            "id": "2",
>>            "class": "section",
>>            "children": [
>>                {
>>                    "id": "3",
>>                    "class": "observation"
>>                }
>>            ]
>>        },
>>        {
>>            "id": "4",
>>            "class": "section",
>>            "children": [
>>                {
>>                    "id": "5",
>>                    "class": "instruction"
>>                }
>>            ]
>>        }
>>    ]
>> }
>> 
>> Given the following query:
>> 
>> {!parent which='id:4'}id:3
>> 
>> I expect the result to be empty as document 3 is not a child document 
>> of document 4.
>> 
>> To reproduce, use the docker container provided here:
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
>> ub.com%2Ftormsh%2FSolr-Example&amp;data=02%7C01%7Ctsh%40dips.no%7C5fef
>> 4e9a68cc41c72fd208d81814e93e%7C2f46c9197c11446584b2e354fb809979%7C0%7C
>> 0%7C637285825378470570&amp;sdata=OyjBalFeXfb0W2euL76L%2BNyRDg9ukvT8TNI
>> aODCmV30%3D&amp;reserved=0
>> 
>> Have I misunderstood something regarding the Block Join Parent Query 
>> Parser?
>> 
>> Tor-Magne Stien Hagen
>> 
>> 
> 
> --
> Sincerely yours
> Mikhail Khludnev

Reply via email to