首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Solr - RSolr:: Error ::Http: RSolr::Error::Http - 400错误请求-未定义的字段类型上重建索引时出错

在Solr - RSolr:: Error ::Http: RSolr::Error::Http - 400错误请求-未定义的字段类型上重建索引时出错
EN

Stack Overflow用户
提问于 2015-09-03 16:21:25
回答 1查看 2.4K关注 0票数 1

我已经在带有Tomcat6的Ubuntu服务器上安装了Solr4.4,链接是- http://www.arborisoft.com/how-to-install-apache-solr-4-4-on-ubuntu-12-04/

模型活动使用Solr (Ruby on Rails项目)进行索引。在重新建立索引时,我得到了这个错误:

代码语言:javascript
复制
RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: {'responseHeader'=>{'status'=>400,'QTime'=>59},'error'=>{'msg'=>'undefined field type','code'=>400}}

URI: http://localhost:8080/solr/update?wt=ruby
Request Headers: {"Content-Type"=>"text/xml"}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Activity</query></delete>"

Backtrace: /home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rsolr-1.0.12/lib/rsolr/client.rb:284:in `adapt_response'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rsolr-1.0.12/lib/rsolr/client.rb:190:in `execute'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rsolr-1.0.12/lib/rsolr/client.rb:176:in `send_and_receive'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rsolr-1.0.12/lib/rsolr/client.rb:82:in `update'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rsolr-1.0.12/lib/rsolr/client.rb:146:in `delete_by_query'(eval):2:in `post'
Tasks: TOP => sunspot:solr:reindex => sunspot:reindex
(See full trace by running task with --trace)

sunspot.yml

代码语言:javascript
复制
staging:
  solr:
    hostname: localhost
    port: 8080
    log_level: WARNING
    path: /solr/
EN

回答 1

Stack Overflow用户

发布于 2015-09-03 19:00:47

我现在可以重新建立索引了。schema.xml遗漏了这一行:

代码语言:javascript
复制
<field name="type" stored="false" type="string" multiValued="true" indexed="true"/>
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32370493

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档