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

后端 未结 7 564
甜味超标
甜味超标 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:50

    These are the terminal commands you should follow to solve your problems:

    1. ps aux | grep solr to get solr process ID
    2. sudo kill , is the ID you found from 1
    3. rm -r , remove the solr directory inside your project to remove all of previous indexes
    4. RAILS_ENV=production bundle exec rake sunspot:solr:start
    5. Change the path to /solr/default inside config/sunspot.yml
      development:
        solr:
          hostname: localhost
          port: 8982
          log_level: INFO
          path: /solr/default
      
    6. RAILS_ENV=production bundle exec rake sunspot:solr:reindex

    Bam! Problems solved! I hope.

提交回复
热议问题