无法重新索引Solr数据:异常写入文档ID赋值1到索引;可能的分析错误

时间:2016-10-21 06:58:44

标签: ruby-on-rails ruby-on-rails-4 solr sunspot sunspot-rails

我在我的rails应用程序中设置了solr搜索,但目前我遇到了很多问题。

第一。我被迫停止并启动,重新启动每个系统重新索引solr。它自动作为apache服务启动,但仍然被迫停止n删除solr文件夹并重新安装并重新索引。

使用下面的命令我遇到问题#2:

    rm solr/ -rf && RAILS_ENV=development bundle exec rake sunspot:solr:start 
&& RAILS_ENV=development bundle exec rake sunspot:reindex

第二。当我尝试重新索引时,我遇到了以下错误:

Successfully started Solr ...
Error - RSolr::Error::Http - 500 Internal Server Error - retrying...
Error - RSolr::Error::Http - 500 Internal Server Error - ignoring...
rake aborted!
RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: 'Exception writing document id Assignment 1 to the index; possible analysis error.','code'=>400}}

URI: http://localhost:8983/solr/development/update?wt=ruby
Request Headers: {"Content-Type"=>"text/xml"}
Request Data: "<?xml version=\"1.0\"..complete XML DATA.......
Backtrace: /home/a/.rvm/gems/ruby-2.3.0@management/gems/rsolr-1.1.2/lib/rsolr/client.rb:288:in `adapt_response'
/home/a/.rvm/gems/ruby-2.3.0@management/gems/rsolr-1.1.2/lib/rsolr/client.rb:189:in `execute'
/home/a/.rvm/gems/ruby-2.3.0@management/gems/rsolr-1.1.2/lib/rsolr/client.rb:175:in `send_and_receive'
/home/a/.rvm/gems/ruby-2.3.0@management/gems/sunspot_rails-2.2.6/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'

0 个答案:

没有答案