Not sure I understand the problem fully to be honest.

>>however it doesn't give the effective keyword in query string.
Are you saying it doesn't add the highlight markup in the appropriate place? If 
so,can you provide a Junit example?

>>I  want to find that "lorem" is the matched part of the query.
Do you mean that you want to get programmatic access to the portions of the 
match rather than a highlighted string?
If so, you could provide a custom Formatter implementation to the Highlighter 
API which is presented with the matching tokens along with their score and 
position.

Cheers,
Mark



----- Original Message ----
From: Mohsen Saboorian <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Sent: Monday, 26 March, 2007 6:31:14 PM
Subject: Re: Matched Query Part in Hit Object


Any hint?


Mohsen Saboorian wrote:
> 
> Hi,
> Is there a way to find the matched part of query string in the Hit object?
> Lucene's Hilghlighter module does part of the job, highlighting the
> matched word in the result document, however it doesn't give the effective
> keyword in query string.
> For example, suppose I have a query: "lorem OR elit".
> 
> The first matched document is (hit 1): "lorem ipsum dolor sit amet". I
> want to find that "lorem" is the matched part of the query.
> The second matched document is (hit 2): "consectetur adipisicing elit". I
> want to find that "elit" is the matched part of the query.
> 
> Thanks in advance.
> 

-- 
View this message in context: 
http://www.nabble.com/Matched-Query-Part-in-Hit-Object-tf3461413.html#a9677750
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






                
___________________________________________________________ 
What kind of emailer are you? Find out today - get a free analysis of your 
email personality. Take the quiz at the Yahoo! Mail Championship. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to