Highlighting phrases

2008-04-20 Thread Scott Smith
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

Highlighting phrases

2013-11-27 Thread Scott Smith
I'm doing some highlighting with the following code fragment: formatter = new SimpleHTMLFormatter(, ); Scorer score = new QueryScorer(myQuery); ht = new Highlighter(formatter, score); ht.setTextFragmenter(new NullFragmenter());

highlighting phrases

2006-01-09 Thread Harini Raghavan
Hi All, I am using the highlighter package to highlight my search results. The query I am passing to the Highlighter is: +(Content:"Apple Computer" Content:"Apple Comp") +(Title:"Apple Computer" Title:"Apple Comp") But the Highlighter is highlighting even occurances of terms 'Computer'/'Comp'.

Re: Highlighting phrases

2008-04-20 Thread Mark Miller
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

RE: Highlighting phrases

2008-04-21 Thread Scott Smith
And a well deserved beer it would be... Thanks Scott -Original Message- From: Mark Miller [mailto:[EMAIL PROTECTED] 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

RE: Highlighting phrases

2013-11-27 Thread Scott Smith
Never mind. I figured it out. Thanks anyway. -Original Message- From: Scott Smith [mailto:ssm...@mainstreamdata.com] Sent: Wednesday, November 27, 2013 9:27 AM To: java-user@lucene.apache.org Subject: Highlighting phrases I'm doing some highlighting with the following code fra

Re: highlighting phrases

2006-01-09 Thread Erik Hatcher
On Jan 9, 2006, at 1:16 PM, Harini Raghavan wrote: I am using the highlighter package to highlight my search results. The query I am passing to the Highlighter is: +(Content:"Apple Computer" Content:"Apple Comp") +(Title:"Apple Computer" Title:"Apple Comp") But the Highlighter is highlighting

Re: highlighting phrases

2006-01-11 Thread Harini Raghavan
Hi Erik, I had a look at the SpansExtractor class by Mark, that can convert any Query to spans. But I think ultimately the analyzer that is used to convert the text in to TokenStream is what is more important. I am using the StandardAnalyzer and it seems to return a stream of Tokens where each to

Re: highlighting phrases

2006-01-11 Thread Erik Hatcher
Harini - you won't find a custom analyzer that does exactly what you've described, but building custom analyzers is pretty straightforward. You can learn a lot about it by looking at the pieces within Lucene's source code or the examples (and text) from Lucene in Action. Reading from an

Highlighting phrases in 2.9

2009-09-30 Thread Scott Smith
I've been looking at the changes I have to make in my code to go from 2.4.1 to 2.9. One of the features I have is to highlight query hits in documents which meet the search criteria. If the query has a phrase, then I need to highlight the phrase, but not isolated words from the phrase which also

Re: Highlighting phrases in 2.9

2009-09-30 Thread Mark Miller
Scott Smith wrote: > I've been looking at the changes I have to make in my code to go from > 2.4.1 to 2.9. One of the features I have is to highlight query hits in > documents which meet the search criteria. If the query has a phrase, > then I need to highlight the phrase, but not isolated words