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
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());
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'.
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
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
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
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
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
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
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
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
11 matches
Mail list logo