You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Marco Remy (Jira)" <ji...@apache.org> on 2019/11/22 18:27:00 UTC

[jira] [Created] (SOLR-13962) DIH: fields added by update processors to $deleteDocById documents trigger warnings

Marco Remy created SOLR-13962:
---------------------------------

             Summary: DIH: fields added by update processors to $deleteDocById documents trigger warnings
                 Key: SOLR-13962
                 URL: https://issues.apache.org/jira/browse/SOLR-13962
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: UpdateRequestProcessors
    Affects Versions: 7.7.1
            Reporter: Marco Remy


Hello,

We are processing XML data with the DIH. Deleted documents are also coming in with XML. Hence the data-config.xml below.
{code:xml}
<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>
{code}
 

We also configured an DefaultValueUpdateProcessor to add an update timestamp to all documents.
{code:xml}
<!-- 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>
{code}
 

Even though the document is marked to be deleted, the update processor adds the timestamp field, which triggers the warning below.
{noformat}
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
{noformat}
 

However, the documents is deleted properly.



--
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