lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anna Berruezo <annb...@gmail.com>
Subject Highlighter error with Lucene 6
Date Wed, 29 Jun 2016 17:01:48 GMT
Hi,

I have the following code:

*QueryScorer scorer = new QueryScorer(query, "context");*
*Highlighter highlighter = new Highlighter(scorer);*
*String fragment = highlighter.getBestFragment(new StandardAnalyzer(),
"content", hDoc.getContent());*

but I get the following error since I've switched to Lucene 6.1.0 (from
5.3.1):

[Handler processing failed; nested exception is
java.lang.NoSuchMethodError:
org.apache.lucene.index.FieldInfo.<init>(Ljava/lang/String;IZZZLorg/apache/lucene/index/IndexOptions;Lorg/apache/lucene/index/DocValuesType;JLjava/util/Map;)V]
con causa raíz
java.lang.NoSuchMethodError:
org.apache.lucene.index.FieldInfo.<init>(Ljava/lang/String;IZZZLorg/apache/lucene/index/IndexOptions;Lorg/apache/lucene/index/DocValuesType;JLjava/util/Map;)V
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:510)
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:456)
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:431)
at org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:380)
at
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getLeafContext(WeightedSpanTermExtractor.java:383)
at
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extractWeightedTerms(WeightedSpanTermExtractor.java:342)
at
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:138)
at
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:113)
at
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getWeightedSpanTerms(WeightedSpanTermExtractor.java:505)
at
org.apache.lucene.search.highlight.QueryScorer.initExtractor(QueryScorer.java:218)
at org.apache.lucene.search.highlight.QueryScorer.init(QueryScorer.java:186)
at
org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:195)
at
org.apache.lucene.search.highlight.Highlighter.getBestFragments(Highlighter.java:155)
at
org.apache.lucene.search.highlight.Highlighter.getBestFragment(Highlighter.java:101)
at
org.apache.lucene.search.highlight.Highlighter.getBestFragment(Highlighter.java:79)
at
com.grupogodo.corp.projects.hemeroteca.repository.impl.LuceneDocumentRepository.searchFragments(LuceneDocumentRepository.java:426)

Anyone having similar issues? I've looked into Lucene 6 documentation, but
I didn't find anything.

Thanks!

Anna

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message