Heroku - RSolr :: Error :: Http(RSolr :: Error :: Http - 404 Not Found [英] Heroku - RSolr::Error::Http (RSolr::Error::Http - 404 Not Found

查看:196
本文介绍了Heroku - RSolr :: Error :: Http(RSolr :: Error :: Http - 404 Not Found的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在config / sunspot.yml中

 制作:
solr:
主机名:http:/ /index.websolr.com/solr / ...
port:8983
log_level:警告
路径:/ solr / production
...

我的Heroku配置变量是

  http://index.websolr.com/solr / ... 

根据文档配置,但我不断收到日志和应用程序崩溃404消息。为了澄清,默认情况下,Sunspot与Solr捆绑在一起,但是,与您的websolr索引完全分开。 Websolr索引通过仪表板进行管理,您可以通过运行 heroku addons:打开websolr 来查看。所有的配置设置都在那里应用;您无法从命令行启动/停止/重新启动websolr。



根据 $ b


默认情况下,Sunspot 1.3.0支持 WEBSOLR_URL 您的Heroku应用程序在生产中使用的环境变量。这让Sunspot无需进一步配置即可在索引上执行操作,使用户无需更改其应用程序的代码即可快速搜索并运行搜索。



如果您想要更多精美 - 对您在不同环境中使用的Solr服务器的控制权限,您可以从应用程序根目录的命令行运行 script / generate sunspot ,以创建一个Sunspot配置文件 config / sunspot.yml


所以你应该能够简单地删除sunspot.yml文件和Sunspot将简单地使用 WEBSOLR_URL 的值。或者,您可以使用以下内容:

 制作:
solr:
主机名:index.websolr .com
port:80
log_level:警告
路径:/ solr / a1b2c3d4e5(无论您的密钥是什么)


In config/sunspot.yml

production:
  solr:
    hostname: http://index.websolr.com/solr/...
    port: 8983
    log_level: WARNING
    path: /solr/production
...

And my Heroku config variable is

http://index.websolr.com/solr/...

And everything else seems to be configured as per the docs, but I keep getting 404 messages in the log and app crashes. Has anyone come across this before and managed to fix it?

To clarify, Sunspot comes bundled with Solr by default, but that is completely separate from your websolr index. Websolr indices are managed through a dashboard that you can see by running heroku addons:open websolr. All of the configuration settings are applied there; you can't start/stop/restart websolr from the command line.

Per the documentation:

By default, Sunspot 1.3.0 supports the WEBSOLR_URL environment variable used by your Heroku application in production. This lets Sunspot perform actions on your index without further configuration, allowing users to get search up and running quickly without necessitating changes to their app’s codebase.

If you would like more fine-grained control over which Solr servers you are using in different environments, you may run script/generate sunspot from a command line in your application’s root directory to create a Sunspot configuration file at config/sunspot.yml.

So you should be able to simply remove the sunspot.yml file and Sunspot will simply use the value of your WEBSOLR_URL. Alternatively, you could use something like this:

production:
   solr:
     hostname: index.websolr.com
     port: 80
     log_level: WARNING
     path: /solr/a1b2c3d4e5 (whatever your key is)

这篇关于Heroku - RSolr :: Error :: Http(RSolr :: Error :: Http - 404 Not Found的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆