Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
7.7.1
-
None
Description
Hello,
We are processing XML data with the DIH. Deleted documents are also coming in with XML. Hence the data-config.xml below.
<dataConfig> <dataSource type="FileDataSource" encoding="UTF-8"/> <document> <entity name="fileListDelete" processor="FileListEntityProcessor" baseDir="/path/to/dir" recursive="true" fileName="delete.xml" rootEntity="false"> <entity name="xmlFileDelete" processor="XPathEntityProcessor" url="${fileListDelete.fileAbsolutePath}" stream="true" forEach="Docs/Doc"> <field column="$deleteDocById" xpath="/Docs/Doc"/> </entity> </entity> </document> </dataConfig>
We also configured an DefaultValueUpdateProcessor to add an update timestamp to all documents.
<!-- solrconfig.xml --> <updateRequestProcessorChain name="default-chain"> <.../> <!-- set update timestamp --> <processor class="solr.DefaultValueUpdateProcessorFactory"> <str name="fieldName">update_timestamp</str> <str name="value">NOW</str> </processor> <processor class="solr.DistributedUpdateProcessorFactory"/> <.../> </updateRequestProcessorChain>
Even though the document is marked to be deleted, the update processor adds the timestamp field, which triggers the warning below.
2019-11-22 18:28:19.241 WARN (qtp436532993-17) [ x:core] o.a.s.h.d.SolrWriter Error creating document : SolrInputDocument(fields: [update_timestamp=NOW]) org.apache.solr.common.SolrException: Document is missing mandatory uniqueKey field: id
However, the documents is deleted properly.
Attachments
Issue Links
- is superceded by
-
SOLR-14783 Remove DIH from 9.0
- Closed