Can't reindex with sunspot / solr in rails app - Error: Severe errors in solr configuration

后端 未结 7 1003
我在风中等你
我在风中等你 2021-02-01 10:42

Ok, so I have a simple rails application and now i\'m trying to implement sunspot for search capabilities. However, after I\'ve generated the config file with rails g sunspot_ra

7条回答
  •  灰色年华
    2021-02-01 11:15

    Here is the easy way (does not require messing with gems or restarting computer):

    rake sunspot:solr:stop
    

    If you have modified the schema, copy the contents of site_root/solr/conf/schema.xml to your clipboard

    Next, delete the entire solr folder at site_root/solr

    Now run:

    rake sunspot:solr:start
    

    This command will create and repopulate the deleted solr folder.

    If you copied schema.xml above, open schema.xml again, select everything, and copy the contents of your clipboard. Save the file.

    Now run:

    bundle exec rake sunspot:solr:reindex
    

提交回复
热议问题