You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Andreas Hubold (Jira)" <ji...@apache.org> on 2020/11/25 17:02:00 UTC

[jira] [Created] (SOLR-15018) Atomic update deletes child documents if schema has catch-all ignore field

Andreas Hubold created SOLR-15018:
-------------------------------------

             Summary: Atomic update deletes child documents if schema has catch-all ignore field
                 Key: SOLR-15018
                 URL: https://issues.apache.org/jira/browse/SOLR-15018
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: update
    Affects Versions: 8.6.3
            Reporter: Andreas Hubold


Nested child documents disappear when some unrelated fields of a parent document are atomically updated, if the schema contains a catch-all dynamic field to ignore unknown fields like:
{noformat}
<dynamicField name="*" type="ignored" />
<fieldType name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" /> {noformat}
{{DistributedUpdateProcessor#getUpdatedDocument}} tries to reconstruct the original document, but it does not receive nested documents from {{RealTimeComponent#getInputDocument}}. Nested documents are correctly found in the index but get lost when {{RealTimeGetComponent#toSolrInputDocument}} creates a SolrInputDocument for it. The problematic code is:
{code:java}
SchemaField sf = schema.getFieldOrNull(fname);
if (sf != null) {
  if ((!sf.hasDocValues() && !sf.stored()) || schema.isCopyFieldTarget(sf)) continue;
} {code}
The code finds the "ignored" SchemaField as matching field for the nested document name (loaded from _nest_path_). Because of that they're not added to the SolrInputDocument.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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