AHMET ARSLAN wrote: >> 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-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > 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 http://www.lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org