You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Scott Smith <ss...@mainstreamdata.com> on 2008/04/21 01:12:54 UTC

Highlighting phrases

I've written some code to highlight items from a search using the standard Highlighter class, QueryScorer, and NullFragmenter.  Everything works fine except when we do phrases.  If I search for "fred smith" (with the quotes), it highlights any instances of "fred smith" just as expected.  However, it also highlights the word "fred" and the word "smith" any place they appear.  Is this the expected behavior?   Can someone point me to where I can change this behavior since it's a big deal to my customer (he only wants entire phrases highlighted)?
 
thanks
 
Scott
 

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


RE: Highlighting phrases

Posted by Scott Smith <ss...@mainstreamdata.com>.
And a well deserved beer it would be...

Thanks

Scott

-----Original Message-----
From: Mark Miller [mailto:markrmiller@gmail.com] 
Sent: Sunday, April 20, 2008 7:50 PM
To: java-user@lucene.apache.org
Subject: Re: Highlighting phrases

https://issues.apache.org/jira/browse/LUCENE-794

Because its for a customer, that will be 1 beer...

On Sun, 2008-04-20 at 17:12 -0600, Scott Smith wrote:
> I've written some code to highlight items from a search using the
standard Highlighter class, QueryScorer, and NullFragmenter.  Everything
works fine except when we do phrases.  If I search for "fred smith"
(with the quotes), it highlights any instances of "fred smith" just as
expected.  However, it also highlights the word "fred" and the word
"smith" any place they appear.  Is this the expected behavior?   Can
someone point me to where I can change this behavior since it's a big
deal to my customer (he only wants entire phrases highlighted)?
>  
> thanks
>  
> Scott
>  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 


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


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


Re: Highlighting phrases

Posted by Mark Miller <ma...@gmail.com>.
https://issues.apache.org/jira/browse/LUCENE-794

Because its for a customer, that will be 1 beer...

On Sun, 2008-04-20 at 17:12 -0600, Scott Smith wrote:
> I've written some code to highlight items from a search using the standard Highlighter class, QueryScorer, and NullFragmenter.  Everything works fine except when we do phrases.  If I search for "fred smith" (with the quotes), it highlights any instances of "fred smith" just as expected.  However, it also highlights the word "fred" and the word "smith" any place they appear.  Is this the expected behavior?   Can someone point me to where I can change this behavior since it's a big deal to my customer (he only wants entire phrases highlighted)?
>  
> thanks
>  
> Scott
>  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 


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