I was wrong about the union of parent types not working for parent parser, it 
does.(I had missed some)

It seems that I had not read carefully the caveats about block masks in the doc 
:
https://solr.apache.org/guide/8_8/other-parsers.html#block-mask

So the parents block mask has to match all docs that can be parents,
and the documents not matching it may be considered as children !!

This is really inconvenient, this binary divide.

So in my case, if I don't include TR as parent type, it may be treated as a 
child type, and then
its child IN docs must be getting returned in the results, (tho I don't 
understand why a subset and not all)

So when using the block join parsers, all doc types that cud be parents of the 
docs identified by the child condition have to be specified in the block mask, 
else they may get marked as children.

At least that is my understanding. Inputs welcome.


-----Original Message-----
From: Manoj Mokashi
Sent: Friday, June 18, 2021 4:17 PM
To: users@solr.apache.org
Subject: RE: Nested documents mixup with block join query parent mask

A similar problem is seen with the parents parser, children belonging to other 
nodes sometimes appear as children In this case, using the union of parent 
types does not seem to work either

-----Original Message-----
From: Manoj Mokashi <manoj.moka...@anjusoftware.com>
Sent: Friday, June 18, 2021 1:09 PM
To: users@solr.apache.org
Subject: Nested documents mixup with block join query parent mask

Hi,

I am using solr 8.6.2

I have the following doc types marked by a type attribute :
TR -> has child doc -> IN
PB -> has child doc -> AU

So the type IN docs exist only under TR and type AU only under PB

But when I run a query like type:IN AND {!child of='type:PB'}type:PB, I get a 
subset of IN results, when actually I expect that there should be none

In these results, I see the root correctly pointing to the TR type doc Also, 
fetching IN children of the TR type works correctly.

So it seems to be a issue with the block join query parser.

I found a weird solution at the link below, which says union of all parent 
types has to be used 
https://stackoverflow.com/questions/37905553/are-solr-nested-objects-broken-for-multilevel-nesting

so if I include TR in the mask :
type:PTASC AND id:IN* AND {!child of='type:(PB TR)'}type:PB, then it returns 0 
rows as expected.

Can somebody explain why this happens ? And whether there is a better way to 
address this ?

Regards,
manoj


Confidentiality Notice
====================
This email message, including any attachments, is for the sole use of the 
intended recipient and may contain confidential and privileged information. Any 
unauthorized view, use, disclosure or distribution is prohibited. If you are 
not the intended recipient, please contact the sender by reply email and 
destroy all copies of the original message. Anju Software, Inc. 4500 S. 
Lakeshore Drive, Suite 620, Tempe, AZ USA 85282.
Confidentiality Notice
====================
This email message, including any attachments, is for the sole use of the 
intended recipient and may contain confidential and privileged information. Any 
unauthorized view, use, disclosure or distribution is prohibited. If you are 
not the intended recipient, please contact the sender by reply email and 
destroy all copies of the original message. Anju Software, Inc. 4500 S. 
Lakeshore Drive, Suite 620, Tempe, AZ USA 85282.

Reply via email to