You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Lucas Kot-Zaniewski (Jira)" <ji...@apache.org> on 2026/10/01 21:54:00 UTC

[jira] [Resolved] (SOLR-18194) Handle Updated Documents in UpgradeCoreIndex Child Doc Check

     [ https://issues.apache.org/jira/browse/SOLR-18194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lucas Kot-Zaniewski resolved SOLR-18194.
----------------------------------------
    Fix Version/s: 10.1
                   9.11
       Resolution: Fixed

> Handle Updated Documents in UpgradeCoreIndex Child Doc Check
> ------------------------------------------------------------
>
>                 Key: SOLR-18194
>                 URL: https://issues.apache.org/jira/browse/SOLR-18194
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Lucas Kot-Zaniewski
>            Assignee: Lucas Kot-Zaniewski
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 10.1, 9.11
>
>          Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> The child doc check in UpgradeCoreIndex compares the docCount with the terms size of the {{\_root\_}} field with the intention that if there are more Lucene documents than unique values (equivalent to the size of terms) then some Lucene documents share a {{\_root\_}}. Nominally this is true, however in case of document updates a single _Solr_ document can be written to the _same_ segment if they are in the _same_ commit window. In this case the (Lucene) docCount will exceed the terms size of {{\_root\_}} even though none of the documents have children. A better check would be to explicitly compare this with the count of Solr documents. Owing to the cycle-free relationship of {{\_root\_}} we know that if the count of distinct Solr documents equals the distinct values of {{\_root\_}} then we have no child docs. We can implement this by looking at the distinct values of Solr's unique key field.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org