|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
|
|
|
|
|
|
Re: ComplexPhraseQueryParser highlight problemLooks 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. AHMET ARSLAN wrote: > I think there is a problem about attachment. I am re-sending it. > > >> Thank you for your interest, Mark. >> >> I am sending a java code (using lucene 2.9.0) that simply >> demonstrates the problem. When the same query string is >> parsed by Lucene's default QueryParser highlighting comes. >> >> I am trying to highlight full original text, preserving >> proximity criteria. >> Choice of FastVectorHighlighter or Highlighter is not >> important for me. >> >> I was using ComplexPhraseQueryParser with solr 1.3.0, >> without problems with PhraseHighlighter. But now with lucene >> 2.9 + solr 1.4 snippets disappeared suddenly. >> >> Thank you for your help. >> >> Ahmet >> > > > -- - Mark http://www.lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@... For additional commands, e-mail: java-user-help@... |
|
|
Re: ComplexPhraseQueryParser highlight problem> 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@... For additional commands, e-mail: java-user-help@... |
|
|
Re: ComplexPhraseQueryParser highlight problemAHMET 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-unsubscribe@... > For additional commands, e-mail: java-user-help@... > > 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-unsubscribe@... For additional commands, e-mail: java-user-help@... |
| Free embeddable forum powered by Nabble | Forum Help |