【问题标题】:Solr Error "no segments* file found in NRTCachingDirectory"Solr 错误“在 NRTCachingDirectory 中找不到段 * 文件”
【发布时间】:2014-04-01 19:00:04
【问题描述】:

我是 ruby​​ on rails 的新手,我正在玩弄 Sunspot_Rails Gem。

我的 gemfile 看起来像这样

gem "sunspot_rails"

group :development do
   gem 'sqlite3', '1.3.8'
   gem 'better_errors'
   gem 'binding_of_caller'
   gem 'sunspot_solr'
end 

我按照 github 上的说明快速入门。我从 solr 开始

bundle exec rake sunspot:solr:start

然后我启动我的 Rails 服务器。

rails s

页面加载,但是当我尝试通过 localhost 添加一个类的实例时,我得到一个错误

RSolr::Error::Http at /dogs 
RSolr::Error::Http - 500 Internal Server Error
Error: {'responseHeader'=>{'status'=>500,'QTime'=>3},'error'=>{'msg'=>'no segments* file        found in NRTCachingDirectory(org.apache.lucene.store.NIOFSDirectory@/Users/ShiftedRec/whosthedee/solr/development/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@170ad173; maxCacheMB=48.0 maxMergeSizeMB=4.0): files: [write.lock]','trace'=>'org.apache.lucene.index.IndexNotFoundException: no segments* file found in 

我在互联网上看到的唯一与此相关的是

http://www.garysieling.com/blog/fixing-solr-error-no-segments-file-found-in-nrtcachingdirectory

我到底做错了什么?

谢谢...

【问题讨论】:

    标签: ruby-on-rails ruby solr sunspot-rails


    【解决方案1】:

    如果您收到此错误 - 只需全新安装.. 已修复

    【讨论】:

    • 你到底是什么意思?您卸载并重新安装了太阳黑子 gem?这对我不起作用
    • 也删除 tmp 文件夹 - 全新安装没有这样做吗?重启服务器?
    • 没有什么对我有用。我必须手动运行服务器:(RAILS_ENV=test bundle exec sunspot-solr run -p 8981 -d solr/data/test
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-06
    • 1970-01-01
    • 2012-07-22
    • 2011-04-07
    • 1970-01-01
    相关资源
    最近更新 更多