タスクのエラーSunspot:Mongo:MongoidとSunspot SolrのReindex
-
27-10-2019 - |
質問
sunspot_mongo gemとsolrを持っています。 Run Sunspot:Mongo:Reindex私はこのエラーが発生します:
reindexing House
rake aborted!
RSolr::Error::Http - 500 Internal Server Error
Error: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.NIOFSDirectory@/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files:
java.lang.RuntimeException: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.NIOFSDirectory@/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files:
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068)
at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:418)
at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:85)
at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:169)
at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:69)
at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><commit/>"
私はレーキサンスポットで止まってsolrを始めました:solr:停止して、私は得ます:
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.10) (6b20-1.9.10-0ubuntu1~10.10.2)
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)
Successfully stopped Solr ...
私はコマンドレーキサンスポットでsolrを始めました:solr:start and i get:
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.10) (6b20-1.9.10-0ubuntu1~10.10.2)
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)
Successfully started Solr ...
編集
ありがとうございますが、働いていません。インデックスフォルダーを削除し、再実行しました Sunspot:Solr:Start そして、私が新しいレジスタを作成するか、実行しようとするとき Sunspot:Solr:Start
reindexing House
rake aborted!
RSolr::Error::Http - 500 Internal Server Error
Error: no segments* file found in org.apache.lucene.store.NIOFSDirectory@/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files: lucene-c43d1f7f8a62a2ff6fed0bddcce1a574-write.lock
java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.NIOFSDirectory@/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files: lucene-c43d1f7f8a62a2ff6fed0bddcce1a574-write.lock
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:655)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:538)
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:306)
at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1577)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1402)
at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:190)
at org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:98)
at org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:173)
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">House 4ed7c2f31d41c8327e000006</field><field name=\"type\">House</field><field name=\"class_name\">House</field><field name=\"content_text\">This is a new house</field></doc></add>"
常にこれを表示します:
C43D1F7F8A62A2FF6FED0BDDCCE1A574-WRITE.LOCK
しかし、私のモデルでこれをコメントしたとき:
#searchable do
#text :content
#end
レーキタスクは正常に動作し、エラーを表示するのではなく、モデルのインデックスを表示しません。
何か案が??
解決
インデックスが破損しています。 solrを停止し、削除します solr/data/development/index
フォルダー、および再実行 sunspot:solr:start
それを再現するために。
他のヒント
@hyperrjas
Nickが言及したインデックスフォルダーを削除することに加えて、実行することにより、すでにスタートしたSOLRプロセスを殺す必要があります ps aux | grep 'solr'
見つけるには。それは今動作するはずです。
所属していません StackOverflow