changing MultiTermRewriteMethod fixed all previous incompatibility issue.
After setting this:
myQueryParser.setMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);
highlighter get compatible with rewrite, query.rewrite().toString() works as
before and scoring works fine for wildc
OK, to answer my own question:
I found from the following issue that if I do a query.rewrite(), highlighter
doesn't work.
https://issues.apache.org/jira/browse/LUCENE-1425
I did rewrite() in order to find all matched terms for example in a prefix
query, but as this doesn't work anymore like Lucen
The problem comes from this method:
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(Query,
Map)
The query passed to this method is of type
org.apache.lucene.search.ConstantScoreQuery, but it matches non of
'instanceof' checkings in this method, so no WeightedSpanTerm is extra
Yes I can (though I need some time, since I have my nested custom analyzers
and filter). I'll try to write a test scenario to reproduce this issue.
For now, can you tell me if these steps are correct for instantiating and
using highlighter:
IndexSearcher is = new IndexSearcher(indexReader);
Quer
Mohsen Saboorian wrote:
> After updating to 2.9.x or 3.0, highlighter doesn't work on wildcard queries
> like "abc*". I thought that it would be because of scoring, so I also set
> myIndexSearcher.setDefaultFieldSortScoring(true, true) before searching.
> I tested with both QueryScorer and QueryTer
After updating to 2.9.x or 3.0, highlighter doesn't work on wildcard queries
like "abc*". I thought that it would be because of scoring, so I also set
myIndexSearcher.setDefaultFieldSortScoring(true, true) before searching.
I tested with both QueryScorer and QueryTermScorer.
In my custom highligh