lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Nacional (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4743) ComplexPhraseQuery highlight problem after rewriting using ComplexPhraseQuery.rewrite(IndexReader)
Date Mon, 04 Feb 2013 00:14:13 GMT


Jason Nacional commented on LUCENE-4743:

Thanks all for the quick response. I can provide you some sample queries:

Let's say we have the following line: Make Sure Our Emails Reach Your Inbox

the query is: "(Make Sur*) Inbox"~10

after searching, the hits are correct. but somehow "Make" is not being highlighted. Am I missing
something here? here is my code.

Query rewrite_result = phrase.rewrite(;
QueryScorer qs_phrases = new QueryScorer(rewrite_result);
highlighter = new Highlighter(htmlFormatter, qs_phrases);
highlighter.setTextFragmenter(new NullFragmenter());
//get the temp text
if(text == null){
text = highlighter.getBestFragment(analyzer, "", pText);
text_temp = highlighter.getBestFragment(analyzer, "", text);
text = text_temp;

I'll start to create a test case for more info.
> ComplexPhraseQuery highlight problem after rewriting using ComplexPhraseQuery.rewrite(IndexReader)
> --------------------------------------------------------------------------------------------------
>                 Key: LUCENE-4743
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search, modules/queryparser
>    Affects Versions: 3.6.2
>            Reporter: Jason Nacional
>              Labels: complexqueryparser, newbie, queryparser
> Just want to ask an assistance using ComplexPhraseQuery. I mean, when it comes to highlighting
the hits are not correct. I also started using ComplexPhraseQueryParser to support complex
proximity searches.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

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

View raw message