Re: ComplexPhraseQueryParser highlight problem

View: New views
6 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: ComplexPhraseQueryParser highlight problem

by markrmiller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


Parent Message unknown Re: ComplexPhraseQueryParser highlight problem

by Ahmet Arslan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...

Parent Message unknown Re: ComplexPhraseQueryParser highlight problem

by Ahmet Arslan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

     


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...

Re: ComplexPhraseQueryParser highlight problem

by markrmiller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


Re: ComplexPhraseQueryParser highlight problem

by Ahmet Arslan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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 problem

by markrmiller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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