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)
精彩评论