Rails app: Solr throwing RSolr::Error::Http - 404 Not Found when executing search

后端 未结 7 565
甜味超标
甜味超标 2020-12-13 14:15

Very lost as I haven\'t made any changes to my search which has always been working but somehow I\'ve got a break. Being relatively new to Rails, the error output isn\'t giv

相关标签:
7条回答
  • 2020-12-13 14:31

    Did someone check in the ./solr directory with your project?

    If so, delete it, run rails g sunspot_rails:install and then start your server again.

    This one's bit me twice now.

    0 讨论(0)
  • 2020-12-13 14:33

    @Marko Taponen's solution worked for me for a while, but now I'm back, because this problem reared its ugly head again, this time in my rpsec/capybara tests.

    Here's what fixed it for me:

    On the command line:

    bundle exec rake sunspot:solr:stop
    

    After doing this, I ran my tests again, and it worked.!

    0 讨论(0)
  • 2020-12-13 14:37
    development:
      solr:
        hostname: localhost
        port: 8982
        log_level: INFO
        path: /solr
      auto_index_callback: after_commit
      auto_remove_callback: after_commit
    
    0 讨论(0)
  • 2020-12-13 14:37

    Also check if schema.xml is loaded from your gem file or from your solr directory in root of the app! You might end up changing schema.xml several times, but it would be the wrong file that is loaded.

    0 讨论(0)
  • 2020-12-13 14:42

    I've been looking forever for the answer to this issue, and to understand why the SOLR Admin page was crashing. Here's the solution for this problem when upgrading sunspot solr from 2.0.0 to 2.1.0:

    Add this entry to your development section of the sunspot.yml: solr_home: solr like the follwoing example ...

    development:
      solr:
        hostname: localhost
        port: 8982
        log_level: INFO
        path: /solr/development
        solr_home: solr
    
    0 讨论(0)
  • 2020-12-13 14:46

    I came across the same issue when upgrading to sunspot 2.1.0 from 2.0.0.

    I resolved this by adding following line to sunspot.yml (under config in my rails app) on the development: block (maybe one is needed for test and production )

        solr_home: solr
    

    So my SOLR installation is under rails-app-dir/solr and the configuration there under conf.

    0 讨论(0)
提交回复
热议问题