first Install OpenJDK 8 JDK

To install OpenJDK 8 JDK using yum, run this command:

  1. sudo yum install java-1.8.0-openjdk-devel aux | grep solr to get solr process ID

2.sudo kill <ID>, is the ID you found from 1

3.rm -rvf <path/to/solr> 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

  1. development:
  2. solr:
  3. hostname: localhost
  4. port: 8982
  5. log_level: INFO
  6. path: /solr/default


RAILS_ENV=production bundle exec rake sunspot:solr:reindex

0条评论 顺序楼层