I believe you are running into the update semantics, new with Solr 4 (4.1?): https://wiki.apache.org/solr/Per%20Steffensen/Update%20semantics I am not sure Wiki is 100% correct (especially on default mode), but it should be good enough.
Basically, because you are specifying some real value in _version_ field, Solr assumes it is an update operation and expects the already stored field to have the same value (to avoid concurrent update issues). You probably want to temporarily switch to override mode, which is 'classic' as described in the link above. Then, after indexing, you can reset the configuration. Regards, Alex. Personal blog: http://blog.outerthoughts.com/ LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch - Time is the quality of nature that keeps events from happening all at once. Lately, it doesn't seem to be working. (Anonymous - via GTD book) On Wed, Mar 13, 2013 at 6:43 AM, Artem OXSEED <a.karpe...@oxseed.com> wrote: > 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=** > 2011042103204394408D878AC717F7**FB21ABF9ECD011CB7ED, ..., > _version_=1426404770097135617, ...] > org.apache.solr.common.**SolrException: version conflict for > 2011042103204394408D878AC717F7**FB21ABF9ECD011CB7ED > 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 > >