[ 
https://issues.apache.org/jira/browse/SOLR-11517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16215403#comment-16215403
 ] 

Ishan Chattopadhyaya edited comment on SOLR-11517 at 10/23/17 4:31 PM:
-----------------------------------------------------------------------

I just checked the possibility of a commit getting interleaved with 
IndexWriter.addDocuments (which is what is used for parent child blocks), and 
seems to me that it cannot happen. Maybe I can write a stress test around it to 
verify to be sure.

bq. the parent goes to a new segment, while child document goes to stays in the 
old segment. 

I thought about this and have a wild hypothesis (I can look into code/write 
tests to figure out if this is a possibility): P1 had children C1, C2, C3 in S1 
segment initially. Then, upon an update, P1 had children C1, C2 in S2 segment 
were added, but the C3 remains a live document (and seemingly without a 
parent). And, this C3 is confusing ToParentBlockJoinQuery somehow. And somehow, 
upon an optimize/forcemerge, the C3 document gets expunged. Do you see this as 
a possibility [~antz], [~dsmiley], [~mkhludnev]?


was (Author: ichattopadhyaya):
I just checked the possibility of a commit getting interleaved with 
IndexWriter.addDocuments (which is what is used for parent child blocks), and 
seems to me that it cannot happen. Maybe I can write a stress test around it to 
verify to be sure.

bq. ToParentBlockJoinQuery which handles the request wont be able to find the 
parent for the searched child documents

I thought about this and have a wild hypothesis (I can look into code/write 
tests to figure out if this is a possibility): P1 had children C1, C2, C3 in S1 
segment initially. Then, upon an update, P1 had children C1, C2 in S2 segment 
were added, but the C3 remains a live document (and seemingly without a 
parent). And, this C3 is confusing ToParentBlockJoinQuery somehow. And somehow, 
upon an optimize/forcemerge, the C3 document gets expunged. Do you see this as 
a possibility [~antz], [~dsmiley], [~mkhludnev]?

> ToParentBlockJoinQuery fails when the parents/child fall in to different 
> segments
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-11517
>                 URL: https://issues.apache.org/jira/browse/SOLR-11517
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 6.6.1
>            Reporter: ananthesh
>
> We have a system where all the documents in the collections are nested child 
> documents. We also have 'autoCommit' enabled for the collection. We also get 
> huge number of document updates. We found a scenario, where 'child' documents 
> were indexed in one segment, while 'parent' document got indexed in the other 
> segment. Here are the docid looks like
> 0 = 95638
> 1 = 95639
> 2 = 95640
> 3 = 272190 \{parent}
> Now if the solr request has been made using "parent" query parser like the 
> following
> {noformat}
> {!parent which=parent:true score=max}(...)
> {noformat}
> ToParentBlockJoinQuery which handles the request wont be able to find the 
> parent for the searched child documents. But if we trigger `optimize` for the 
> same index which forces to merge all the segments to single index, the above 
> request will be able to fetch the results. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to