gpt4 book ai didi

ruby-on-rails - Sunspot 2.1.0 RSolr::Error::Http (RSolr::Error::Http - 404 Not Found

转载 作者:行者123 更新时间:2023-12-01 06:30:05 24 4
gpt4 key购买 nike

运行 Rails 4.0.1 和 Sunspot 2.1.0,我设法在开发中运行 sunspot,但是当我尝试执行查询或索引时,出现以下错误:

RSolr::Error::Http (RSolr::Error::Http - 404 Not Found
Error: Not Found

Request Data: "fq=type%3AMatch&q=arsenal&defType=edismax&start=0&rows=10"

Backtrace: /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/rsolr-1.0.10/lib/rsolr/client.rb:283:in `adapt_response'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/rsolr-1.0.10/lib/rsolr/client.rb:190:in `execute'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/rsolr-1.0.10/lib/rsolr/client.rb:176:in `send_and_receive'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/sunspot_rails-2.1.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/activesupport-4.0.1/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/activesupport-4.0.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/activesupport-4.0.1/lib/active_support/notifications.rb:159:in `instrument'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/sunspot_rails-2.1.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/sunspot-2.1.0/lib/sunspot/search/abstract_search.rb:45:in `execute'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/sunspot-2.1.0/lib/sunspot/session.rb:59:in `search'):
app/models/match.rb:483:in `upcoming_games'
app/controllers/tickets_controller.rb:34:in `search'


Rendered /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.0.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.6ms)
Rendered /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
Rendered /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
Rendered /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (13.1ms)

这是我的太阳黑子.yml
production:
solr:
hostname: ENV['WEBSOLR_URL']
port: 80
log_level: WARNING
path: /solr/production
# read_timeout: 2
# open_timeout: 0.5
development:
solr:
hostname: localhost
port: 8982
log_level: INFO
path: /solr/development
# solr_home: solr
test:
solr:
hostname: localhost
port: 8981
log_level: WARNING
path: /solr/test

注意 我尝试了不同的 solr_home 配置,尝试删除 solr 文件夹并按照其他地方的建议重新启动 sunspot,并确保 pid Rails 尝试连接到的 pid 是相同的。

我知道还有其他类似的帖子,但没有一个提供对我有用的解决方案。任何的想法?

就其值(value)而言,我正在使用 Mongoid。但这似乎几乎没有关系。

最佳答案

尝试从 sunspot.yml 中的生产配置中删除“path”指令,很可能 solr_home 指向默认目录(/solr),其中索引实际存在

你能试试这个吗:

$ ps 辅助 | grep solr

并在这里发布输出?

关于ruby-on-rails - Sunspot 2.1.0 RSolr::Error::Http (RSolr::Error::Http - 404 Not Found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23147056/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com