Solr with Rails - rake sunspot:reindex is not working

旧时模样 提交于 2019-11-29 09:35:13

Had the same problem slightly different on error logging. In my case it was like:

2013-07-18 10:26:47.750:INFO:oejw.StandardDescriptorProcessor:NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet
Null identity service, trying login service: null
Finding identity service: null

What I'm using is Solr 4, which has a better Admin interface, so into the Gemfile:

gem 'sunspot_solr', github: 'sunspot/sunspot', branch: 'master'
gem 'sunspot_rails', github: 'sunspot/sunspot', branch: 'master'

And that's it, no more. Just notice the github: part. I did something similar to what you did: deleted the solr directory, then,

bundle install

then,

rails generate sunspot_rails:install

and then,

bundle exec rake sunspot:solr:start

and eventually it started to work.

Next, run

bundle exec rake sunspot:reindex

One thing I have to admit, is that before the above procedure, since I have Solr 4, I replaced my xml files with these from here. Not sure whether this is critical.

Hope this helps someone.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!