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

Mailing List Archive: Lucene: Java-User

Can Highlighter handle multiple word terms?

 

 

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


Andreas.Guther at markettools

Mar 2, 2007, 8:17 AM

Post #1 of 3 (551 views)
Permalink
Can Highlighter handle multiple word terms?

Hi,



I am using the Highlighter class to highlight my search results. So far
my observation is that the Highlighter does not highlight terms with
multiple words in it.



For example if I have a text like "This is an example text for the
highlighter" and my search term is "example highlighter" than I would
expect to get back from the Highlighter the following: "This is an
<B>example</B> text for the <B>highlighter</B>". So far the highlighter
only returns an empty String. I am passing in the StandardAnalyzer.



It also looks to me as if the Highlighter cannot handle a term like
"contents:example".





I wonder if I am missing here something or if this is a limitation of
the Highlighter.





Can some one enlighten me?



Andreas


markrmiller at gmail

Mar 2, 2007, 10:06 AM

Post #2 of 3 (525 views)
Permalink
Re: Can Highlighter handle multiple word terms? [In reply to]

What fragment size are you using? Have you tried the null fragmenter?
Are you using the QueryScorer that you can pass a field name to restrict
highlighting to a certain field? Do you have any example code of what
you are attempting? Have you looked at the test code for examples of how
to use the Highlighter?

- Mark

Andreas Guther wrote:
> Hi,
>
>
>
> I am using the Highlighter class to highlight my search results. So far
> my observation is that the Highlighter does not highlight terms with
> multiple words in it.
>
>
>
> For example if I have a text like "This is an example text for the
> highlighter" and my search term is "example highlighter" than I would
> expect to get back from the Highlighter the following: "This is an
> <B>example</B> text for the <B>highlighter</B>". So far the highlighter
> only returns an empty String. I am passing in the StandardAnalyzer.
>
>
>
> It also looks to me as if the Highlighter cannot handle a term like
> "contents:example".
>
>
>
>
>
> I wonder if I am missing here something or if this is a limitation of
> the Highlighter.
>
>
>
>
>
> Can some one enlighten me?
>
>
>
> Andreas
>
>
>
>
>
>
>
>
>
>
>

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


Andreas.Guther at markettools

Mar 3, 2007, 7:11 PM

Post #3 of 3 (527 views)
Permalink
RE: Can Highlighter handle multiple word terms? [In reply to]

Mark,

Thank you for your answer.

Andreas



-----Original Message-----
From: Mark Miller [mailto:markrmiller [at] gmail]
Sent: Friday, March 02, 2007 10:07 AM
To: java-user [at] lucene
Subject: Re: Can Highlighter handle multiple word terms?

What fragment size are you using? Have you tried the null fragmenter?
Are you using the QueryScorer that you can pass a field name to restrict

highlighting to a certain field? Do you have any example code of what
you are attempting? Have you looked at the test code for examples of how

to use the Highlighter?

- Mark

Andreas Guther wrote:
> Hi,
>
>
>
> I am using the Highlighter class to highlight my search results. So
far
> my observation is that the Highlighter does not highlight terms with
> multiple words in it.
>
>
>
> For example if I have a text like "This is an example text for the
> highlighter" and my search term is "example highlighter" than I would
> expect to get back from the Highlighter the following: "This is an
> <B>example</B> text for the <B>highlighter</B>". So far the
highlighter
> only returns an empty String. I am passing in the StandardAnalyzer.
>
>
>
> It also looks to me as if the Highlighter cannot handle a term like
> "contents:example".
>
>
>
>
>
> I wonder if I am missing here something or if this is a limitation of
> the Highlighter.
>
>
>
>
>
> Can some one enlighten me?
>
>
>
> Andreas
>
>
>
>
>
>
>
>
>
>
>

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


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