Hi,

I've configured data import handler:

<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
      <str name="config">data-config.xml</str>
    </lst>
  </requestHandler>

data-config.xml:

<dataConfig>
  <document>
    <entity name="sep" processor="SolrEntityProcessor"
    url="http://host:8080/index"; query="*:*" wt="javabin"/>
  </document>
</dataConfig>

Both Solr instances are of the same version - 4.1. Target Solr instance is empty - no documents exist there.

During data import I see constant errors in console:

WARNING: Error creating document : SolrInputDocument[..., internal_id=2011042103204394408D878AC717F7FB21ABF9ECD011CB7ED, ..., _version_=1426404770097135617, ...] org.apache.solr.common.SolrException: version conflict for 2011042103204394408D878AC717F7FB21ABF9ECD011CB7ED expected=1426404770097135617 actual=-1 at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:543) at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:350) at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100) at org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:70) at org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:234) at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:500) at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:404) at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:319) at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:227) at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:422) at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:487) at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:468)

(internal_id field is a unique key)

No documents are therefore being imported. It's interesting to note that data in the source Solr were imported there by the same data import configuration from yet another Solr instance - only from an older version (with wt="xml" of course). That old data did not contain _version_ field (Solr 1.4.1) so this problem could not appear at all.

I've tried specifying a few fields in fl parameter of SolrEntityProcessor, without including _version_ field - it works. So I guess the last way would be to specify all document fields there excluding _version_ - but it's not convenient at all.

Any ideas on what might be a problem here?

--
Warm regards,
Artem Karpenko

Reply via email to