Solr DIH showing data import successfull but no docs retrieved via query

徘徊边缘 提交于 2020-04-30 06:39:34

问题


I am using the SolrEntityProcessor in my DIH config to reindex data from one collection to another. Here is my DIH config for the same

<dataConfig>
  <document>
    <entity name="sep" processor="SolrEntityProcessor"
            url="http://127.0.0.1:8983/solr/techPro2 "
            query="*:*"/>
  </document>
</dataConfig>

I have another collection techproducts(destination collection) which has the same configset(sample_techproducts_configs) as techPro2 (my source collection here).

So after performing a fullimport of the data, this is the output i get

Indexing completed. Added/Updated: 10 documents. Deleted 0 documents. (Duration: 01s) Requests: 0 , Fetched: 10 10/s, Skipped: 0 , Processed: 10 10/s Started: less than a minute ago

Also in debug mode here is the detailed output

  "responseHeader": {
    "rf": 2147483647,
    "status": 0,
    "QTime": 120
  },
  "initArgs": [
    "defaults",
    [
      "config",
      "DIHconfigfile.xml"
    ]
  ],
  "command": "full-import",
  "mode": "debug",
  "documents": [
    {
      "author": "Glen Cook",
      "genre_s": "fantasy",
      "price_c____l_ns": 699,
      "series_t": "The Chronicles of The Black Company",
      "price_c": "6.99,USD",
      "author_s": "Glen Cook",
      "_version_": 1656949432473616400,
      "price": 6.99,
      "cat": "book",
      "name": "The Black Company",
      "inStock": false,
      "sequence_i": 1,
      "id": "0812521390"
    },
{},....{}
],
  "verbose-output": [],
  "status": "idle",
  "importResponse": "",
  "statusMessages": {
    "Total Requests made to DataSource": "0",
    "Total Rows Fetched": "10",
    "Total Documents Processed": "10",
    "Total Documents Skipped": "0",
    "Full Dump Started": "2020-01-28 06:14:23",
    "": "Indexing completed. Added/Updated: 10 documents. Deleted 0 documents.",
    "Committed": "2020-01-28 06:14:23",
    "Time taken": "0:0:0.77",
    "Full Import failed": "2020-01-28 06:14:23"
  }
}

Now in the json response the last key "Full Import failed": "2020-01-28 06:14:23" it says the import failed and the status that I get says indexing completed and when I query the collection I get 0 docs returned

{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":12,
    "params":{
      "q":"*:*",
      "_":"1580193223772"}},
  "response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]
  }}

Edit 1 Here are the error in the logs

Full Import failed:org.apache.solr.update.processor.DistributedUpdateProcessor$DistributedUpdatesAsyncException: Async exception during distributed update: Error from server at http://172.23.98.162:7574/solr/filmsCopy_shard2_replica_n6/: null



request: http://172.23.98.162:7574/solr/filmsCopy_shard2_replica_n6/
Remote error message: version conflict for /en/code_46 expected=1656968541372416000 actual=-1
    at org.apache.solr.update.processor.DistributedZkUpdateProcessor.doDistribFinish(DistributedZkUpdateProcessor.java:1189)
    at org.apache.solr.update.processor.DistributedUpdateProcessor.finish(DistributedUpdateProcessor.java:1096)
    at org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor.finish(LogUpdateProcessorFactory.java:182)
    at org.apache.solr.update.processor.UpdateRequestProcessor.finish(UpdateRequestProcessor.java:80)
    at org.apache.solr.update.processor.UpdateRequestProcessor.finish(UpdateRequestProcessor.java:80)
    at org.apache.solr.update.processor.UpdateRequestProcessor.finish(UpdateRequestProcessor.java:80)
    at org.apache.solr.update.processor.UpdateRequestProcessor.finish(UpdateRequestProcessor.java:80)
    at org.apache.solr.update.processor.UpdateRequestProcessor.finish(UpdateRequestProcessor.java:80)
    at org.apache.solr.update.processor.UpdateRequestProcessor.finish(UpdateRequestProcessor.java:80)
    at org.apache.solr.update.processor.UpdateRequestProcessor.finish(UpdateRequestProcessor.java:80)
    at org.apache.solr.update.processor.UpdateRequestProcessor.finish(UpdateRequestProcessor.java:80)
    at org.apache.solr.handler.dataimport.SolrWriter.close(SolrWriter.java:61)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:275)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:424)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:483)
    at org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImporter.java:466)
    at java.base/java.lang.Thread.run(Thread.java:834)

More logs

 06:12:14.129 WARN  (Thread-26) [   ] o.a.s.h.d.SolrWriter Error creating document : SolrInputDocument(fields: [_version_=1656968541868392448, name=Find Me Guilty, id=/en/find_me_guilty]) => org.apache.solr.common.SolrException: version conflict for /en/find_me_guilty expected=1656968541868392448 actual=-1

来源:https://stackoverflow.com/questions/59943301/solr-dih-showing-data-import-successfull-but-no-docs-retrieved-via-query

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!