lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <>
Subject Re: ComplexPhraseQueryParser highlight problem
Date Tue, 03 Nov 2009 22:36:20 GMT
>> Looks like its because the query
>> coming in is a ComplexPhraseQuery and
>> the Highlighter doesn't current know how to handle that
>> type.
>> It would need to be rewritten first barring the special
>> handling it
>> needs - but unfortunately, that will break multi-term query
>> highlighting
>> unless you use boolean rewrite mode with them.
> Hi Mark,
> ComplexPhraseQueryParser.parse() method returns ComplexPhraseQuery.
> As you said when I feed QueryScorer with ComplexPhraseQuery.rewrite(IndexSearcher.getIndexReader()),
highlighting succeeded. FastVectorHighlighter didn't work, but all is well.
> "A query must be rewritten in its most primitive form for QueryScorer to be happy." [LIA
> I thought that solr highlighting component does this by default. 
> Although solr version has still some problems, lucene version working perfectly.
> Thank you for your input, it really helped.
> Ahmet
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
QueryScorer has changed by default in both Lucene and Solr - for most
queries you don't want to rewrite it. But for queries it doesn't
currently handle, you might have to. You can get Solr to work as it used
to if you pass usePhraseHighlighter=false - you will lose correct phrase
query handling, but it will do the rewrite for you. This will likely be
improved eventually.

- Mark

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message