lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shailendra Sharma" <>
Subject Re: Lucene Field score value
Date Tue, 31 Jul 2007 18:03:16 GMT
Though I am not sure what is the possible use case for thing like below, but
here is the pointer:

Using IndexSearcher you can get the "Explanation" for the given query and
document-id. Complex Explanation has multiple sub-explanations and so forth.
Simple Explanation would contain the weight of the query (queryWeight) and
weight of the field (fieldWeight).

You can simply write some method which consumes Explanation and returns you
the score for given field. Note that, there might be explanations for the
same field - so you need to add them. Don't forget to multiply by factors
like boost-factor to get the exact score for a given field.

Thanks, Shailendra

On 7/31/07, Askar Zaidi <> wrote:
> Hey guys,
> I was wondering if there is a way to retrieve score of a field in a
> document
> ?
> If my document looks like this:
> {itemID},{field 1},{field 2}
> I'd like to get score of individual fields 1 and 2 rather than the score
> of
> the entire document.
> Is it possible ?
> thanks,
> AZ

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message