我用sunspot_mongo創建了solr寶石。當我嘗試運行黑子:蒙戈:重新索引我得到這個錯誤:任務太陽黑子中的錯誤:mongo:在Sunspot Solr中與Mongoid重新索引
reindexing House
rake aborted!
RSolr::Error::Http - 500 Internal Server Error
Error: java.io.FileNotFoundException: no segments* file found in [email protected]/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files:
java.lang.RuntimeException: java.io.FileNotFoundException: no segments* file found in [email protected]/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的:開始我也得到:
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 ...
EDITED
謝謝你,但不工作。我已經刪除索引文件夾,我已經重新運行黑子:Solr的:開始,當我嘗試創建一個新的寄存器或運行黑子:Solr的:開始
reindexing House
rake aborted!
RSolr::Error::Http - 500 Internal Server Error
Error: no segments* file found in [email protected]/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files: lucene-c43d1f7f8a62a2ff6fed0bddcce1a574-write.lock
java.io.FileNotFoundException: no segments* file found in [email protected]/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開始應該用段文件重新創建索引文件夾。 – Jayendra