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

David Smiley commented on SOLR-15018:
-------------------------------------

FWIW, I don't recommend a "*" ignored catch-all dynamic field except maybe in 
some early prototyping scenario as a sort of TODO before you lock down the 
schema.

> 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
>            Priority: Major
>              Labels: AtomicUpdate, ChildDocuments, NestedDocuments
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to