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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to