lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] [Commented] (SOLR-11517) ToParentBlockJoinQuery fails when the parents/child fall in to different segments
Date Mon, 23 Oct 2017 02:44:00 GMT


David Smiley commented on SOLR-11517:

bq. I was referring to the document replacement. It is automated to replace the complete product(product-child).
But what happens is, whenever the `autoCommit` is triggered at the time of document update,
the parent goes to a new segment, while child document goes to stays in the old segment.

_If that's actually true_ then it sounds like a Lucene bug.  Solr passes the parent-children
set as one group to Lucene.  A commit shouldn't break that grouping down the middle.  {{IndexWriter.addDocuments}}
is what is called and the very first word of it's javadocs no less is "Atomically".  Perhaps
you aren't truly passing the product-child set correctly even though that's your intention?
 If you're using SolrJ, then SolrInputDocument has {{addChildDocument}}.  There's XML &
JSON equivalents.

Per chance are you doing index sorting?  That feature is incompatible with this.

> ToParentBlockJoinQuery fails when the parents/child fall in to different segments
> ---------------------------------------------------------------------------------
>                 Key: SOLR-11517
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message