【发布时间】:2019-06-14 15:52:50
【问题描述】:
我设置远程 Solr 连接只是为了测试它,我的配置文件只引用远程服务器,但是当我运行时
bundle exec rake sunspot:solr:start
它启动一个 Solr 的本地实例。
我尝试将 sunspot.yml 中的所有内容更改为引用远程服务器,当我进入应用程序并尝试搜索时,它确实使用了远程服务器,但我希望能够运行 Sunspot因为没有 Sunspot 的情况下重新索引很痛苦。
这是我的sunspot.yml 文件:
production:
solr:
hostname: {remote host}
port: 8983
log_level: WARNING
path: /solr/production
# read_timeout: 2
# open_timeout: 0.5
development:
solr:
hostname: {remote host}
port: 8983
log_level: INFO
path: /solr/development
test:
solr:
hostname: {remote host}
port: 8983
log_level: WARNING
path: /solr/test
没有错误消息,但我希望应用服务器上运行的 Sunspot 命令会影响远程 Solr 服务器。
当我跑步时:
bundle exec rake sunspot:solr:run
它说它是
Starting Solr on port 8983 from /usr/local/rvm/gems/ruby-1.9.3-p551@rails3.2/gems/sunspot_solr-2.3.0/solr/server
但这应该是远程连接。
有人知道如何配置它吗?
【问题讨论】:
标签: ruby-on-rails solr remote-access sunspot