lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com>
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.

Daniel

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


Mime
View raw message