You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by makkhar <mk...@selectica.com> on 2007/09/10 10:12:43 UTC

Finding out which field caused the search hit

This question has been asked numerous times here. But the answer has never
been satisfactory. Can someone answer it full and final, please ?

If you get back a document as a search hit. How do you find out which field
in it matched ? Just the position of the field is sufficient !

-thanks

-- 
View this message in context: http://www.nabble.com/Finding-out-which-field-caused-the-search-hit-tf4412955.html#a12588494
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: Finding out which field caused the search hit

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Sep 10, 2007, at 4:12 AM, makkhar wrote:
> This question has been asked numerous times here. But the answer  
> has never
> been satisfactory. Can someone answer it full and final, please ?
>
> If you get back a document as a search hit. How do you find out  
> which field
> in it matched ? Just the position of the field is sufficient !

Short answer is you can't.  Longer answer, of course Lucene matches  
on a per-field basis, so it is determining those sorts of things  
during the search operation, but it does not keep that information  
handy along with the Hit.

	Erik


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