开发者

sunspot and solr

开发者 https://www.devze.com 2023-03-29 00:15 出处:网络
I\'m currently try to get my sunspot / solr to work. In Dev its all fine and good. But when it comes to production, I\'ll get the following error.

I'm currently try to get my sunspot / solr to work. In Dev its all fine and good. But when it comes to production, I'll get the following error.

RSolr::RequestError (Solr Response: Not Found):
  app/controllers/examples_controller.rb:48:in `update'

sunspot.yml looks like this:

 solr:
    hostname: localhost
    port: 8983
    path: '/opt/apache-solr-3.3.0/example'
    log_level: WARNING
    pid_dir: '/var/run'

Can anybody sort t开发者_开发技巧hat out?


The path option is the path component of your Solr server's URL. It should read /solr rather than the filesystem path you have now. As it is, Sunspot is trying to connect to http://localhost:8983/opt/apache-solr-3.3.0/example ;)

The correct version:

solr:
   hostname: localhost
   port: 8983
   path: /solr
   log_level: WARNING
   pid_dir: /var/run

(Also, don't forget to copy Sunspot's standard schema.xml into your Solr directory somewhere under /opt/apache-solr-3.3.0)

0

精彩评论

暂无评论...
验证码 换一张
取 消