Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Re: ComplexPhraseQueryParser highlight problem

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


markrmiller at gmail

Nov 2, 2009, 5:04 AM

Post #1 of 6 (1156 views)
Permalink
Re: ComplexPhraseQueryParser highlight problem

Yes - please share your test programs and I can investigate (ApacheCon
this week, so I'm not sure when).

And its best to keep communications on the list - that allows others
with similar issues (now or in the future) to benefit from whatever goes
on. You will also reach a wider pool of people that can possibly help or
add valuable input.


--
- Mark

http://www.lucidimagination.com


AHMET ARSLAN wrote:
> Hi Mark,
>
> I am using LUCENE-1486. I am having highlighting problems with it.
> With solr 1.3.0 it was working with hl.usePhraseHighlighter=true which uses SpanScorer to highlight phrase terms only when they appear within the query phrase in the document.
>
> But when I switched to Solr 1.4 highlights disappeared. I tried to highlight using lucene 2.9.0 API, again I failed. I also tried FastVectorHighlighter but it didn't produce highlight. I can share my test programs if you want.
>
> What could be the reason? Document are matching but highlights are missing.
> Any pointers to enable highlighting with ComplexPhraseQuery are really appreciated.
>
> I am writing this e-mail directly to you. If you want i can post it to lucene-java maling list, or to LUCENE-1486. I am not sure which one is more appropriate.
>
> Please give me some directions.
>
> Thank you for your time.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


iorixxx at yahoo

Nov 2, 2009, 4:12 PM

Post #2 of 6 (1109 views)
Permalink
Re: ComplexPhraseQueryParser highlight problem [In reply to]

> Yes - please share your test programs
> and I can investigate (ApacheCon
> this week, so I'm not sure when).

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

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


iorixxx at yahoo

Nov 2, 2009, 4:21 PM

Post #3 of 6 (1100 views)
Permalink
Re: ComplexPhraseQueryParser highlight problem [In reply to]

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


markrmiller at gmail

Nov 2, 2009, 4:42 PM

Post #4 of 6 (1100 views)
Permalink
Re: ComplexPhraseQueryParser highlight problem [In reply to]

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.



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 [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


iorixxx at yahoo

Nov 3, 2009, 2:15 PM

Post #5 of 6 (1083 views)
Permalink
Re: ComplexPhraseQueryParser highlight problem [In reply to]

> 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 [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


markrmiller at gmail

Nov 3, 2009, 2:36 PM

Post #6 of 6 (1081 views)
Permalink
Re: ComplexPhraseQueryParser highlight problem [In reply to]

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-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>
>
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-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.