lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Greene" <>
Subject RE: Term offsets for highlighting
Date Sun, 18 Apr 2010 13:09:05 GMT
Hi Koji,

Thank you for your reply. I did try the QueryScorer without success, but
I was using Lucene 2.4.x 
I noticed in the upgrade documentation that some changes had been made
relative to QueryScorer and QueryTermScorer in 3.1. I thought I would
check if someone else had come up with a solution for returning term
offsets before I set out to refactor the existing code. Do you have any
insight as to whether the fast vector highlighter would offer any
benefits in this area over the highlighter package?

Thank you,


-----Original Message-----
From: Koji Sekiguchi [] 
Sent: Friday, April 16, 2010 9:49 PM
Subject: Re: Term offsets for highlighting

Stephen Greene wrote:
> Hello,
> I am trying to determine begin and end offsets for terms and phrases
> matching a query.
> Is there a way using either the highlighter or fast vector highlighter
> in contrib? 
> I have already attempted extending the highlighter which would match
> terms but would not match phrases.
Did you try QueryScorer? If I remember it correctly, QueryScorer
can recognize phrase matches. Note that QueryScorer can recognize
though, tagging works per term in phrase query, not phrase. i.e. if your

query is
phrase "foo bar", highlighter will return <b>foo</b> <b>bar</b>, not
<b>foo bar</b>.



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message