RSolr :: Error :: Http在PostsController #index中

时间:2014-03-31 06:07:42

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

我让它在开发模式下工作,但是当我搞砸到生产模式时出现了问题。我已经在这4个小时了。我卸载了宝石sunspot_rails和sunspot_solr并删除了与它们相关的所有文件并再次执行,我仍然得到同样的错误,我不明白

错误:

RSolr::Error::Http - 404 Not Found Error: NOT_FOUND Request Data: "fq=type%3APost&start=0&rows=10&q=%2A%3A%2A" Backtrace: /home/action/.rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.10/lib/rsolr/client.rb:283:in `adapt_response' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.10/lib/rsolr/client.rb:190:in `execute' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.10/lib/rsolr/client.rb:176:in `send_and_receive' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/sunspot_rails-2.1.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/sunspot_rails-2.1.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation' (eval):2:in `post' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/sunspot-2.1.0/lib/sunspot/search/abstract_search.rb:45:in `execute' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/sunspot_rails-2.1.0/lib/sunspot/rails/searchable.rb:344:in `solr_execute_search'

提取来源:

 def index
@search = Post.search do   <======this is highlighted
  fulltext params[:search]
  paginate :page => params[:page], :per_page => 10
end

1 个答案:

答案 0 :(得分:0)

通过添加

修复
 url: http://localhost:8982/solr/development

到sunspot.yml