lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <>
Subject Re: Question with Hits Interface
Date Tue, 18 Mar 2008 23:30:13 GMT
On Wednesday 19 March 2008 01:44:33 Ramdas M Ramakrishnan wrote:
> I am using a MultiFieldQueryParser to parse and search the index. Once I
> have the Hits and iterate thru it, I need to know the following?
> For every hit document I need to know under which indexed field was this
> Hit originating from? Say I have indexed 2 Fields how will I know from the
> Hit which Field the Hit came from?

query.createWeight(searcher).explain(reader, docId) ?

Or just look at the text.

Why do you need to know this anyway?  If it's for sorting title matches 
higher, you're supposed to use boosting for that.  If it's for highlighting 
then the highlighter would do nothing if there are no matches.


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

View raw message