开发者

Lucene crashes with Highlighting

I have a Ubuntu setup with Luciene, Solr and a Rails application. I use Solr for indexing and searching data from the Rails application. This works fine, except sometimes.

I get this 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!'

I search for this and found, that I need the lucene-memory.jar, but this is set up on my server:

 $ locate lucene-memory
 /usr/share/java/lucene-memory-2.9.2.jar
 /usr/share/java/lucene-memory.j开发者_开发技巧ar

I don't know why?!?


Try to put that jar to:

solr\VERSION\lib\

where VERSION might be 1.4.1 or whatever you have. The reason for that is to load that jar in a explicit way from solr.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜