lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lingaraju" <lingaraju.shambulinga...@infactindia.com>
Subject Re: Logic of score method in hits class
Date Tue, 27 Jul 2004 06:31:41 GMT
I did in the same way what you mentioned i mean "divide all scores by the
first score and multiply by 100"

Still I am not geeting exactly what I wanted.
I am searching for two words "asia cup" in the search
First three hits contains both words what i am searching for  but i got
percentages 100,69 and 33 respectively.

I am using

 String fields[] = new String[2];
 fields[0] = "title";
 fields[1] = "contents";
 Query q = MultiFieldQueryParser.parse(line,fields,analyzer);

 Hits hits = searcher.search(q);
 float sc = hits.score(i);

Thanks in advance
Raju






----- Original Message ----- 
From: "Doug Cutting" <cutting@apache.org>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Monday, July 26, 2004 11:37 PM
Subject: Re: Logic of score method in hits class


> Lucene scores are not percentages.  They really only make sense compared
> to other scores for the same query.  If you like percentages, you can
> divide all scores by the first score and multiply by 100.
>
> Doug
>
> lingaraju wrote:
> > Dear  All
> >
> > How the score method works(logic) in Hits class
> > For 100% match also score is returning only 69%
> >
> > Thanks and regards
> > Raju
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


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


Mime
View raw message