0
我有一個Ubuntu的安裝與Luciene,Solr和Rails應用程序。我使用Solr從Rails應用程序索引和搜索數據。這工作正常,有時除外。Lucene與突出顯示崩潰
我得到這個execption:
Net::HTTPFatalError (500 "org/apache/lucene/index/memory/MemoryIndex java.lang.NoClassDefFoundError:
org/apache/lucene/index/memory/MemoryIndex
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getReaderForField(WeightedSpanTermExtractor.java:361)
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extractWeightedSpanTerms(WeightedSpanTermExtractor.java:282)
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:149)
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getWeightedSpanTerms(WeightedSpanTermExtractor.java:414)
org.apache.lucene.search.highlight.QueryScorer.initExtractor(QueryScorer.java:216)
org.apache.lucene.search.highlight.QueryScorer.init(QueryScorer.java:184)
org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:226)
org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:335)
org.apache.solr.handler.component.HighlightComponent.process(HighlightComponent.java:89)
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:195)
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
org.apache.solr.core.SolrCore.execute(SolrCore.java:1317)
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) org.mor"):
/usr/local/ruby/1.9.2-rc2/lib/ruby/1.9.1/net/http.rb:2295:in `error!'
我搜索,發現這個,我需要的Lucene memory.jar,但這是建立在我的服務器上:
$ locate lucene-memory
/usr/share/java/lucene-memory-2.9.2.jar
/usr/share/java/lucene-memory.jar
我不知道爲什麼?!?
太棒了! 「cd/usr/share/solr/WEB-INF/lib && ln -s ../../../java/lucene-memory.jar」。解決了這個問題!謝謝! – Fu86 2011-01-28 16:58:28