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,

Steve

-----Original Message-----
From: Koji Sekiguchi [mailto:k...@r.email.ne.jp] 
Sent: Friday, April 16, 2010 9:49 PM
To: java-user@lucene.apache.org
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
phrases,
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>.

Koji

-- 
http://www.rondhuit.com/en/


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


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

Reply via email to