lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AHMET ARSLAN <iori...@yahoo.com>
Subject Re: ComplexPhraseQueryParser highlight problem
Date Tue, 03 Nov 2009 22:15:44 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 Book]

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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message