You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by lingaraju <li...@infactindia.com> on 2004/07/26 13:23:34 UTC

Logic of score method in hits class

Dear  All

How the score method works(logic) in Hits class
For 100% match also score is returning only 69% 

Thanks and regards
Raju

Re: Logic of score method in hits class

Posted by lingaraju <li...@infactindia.com>.
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" <cu...@apache.org>
To: "Lucene Users List" <lu...@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


Re: Logic of score method in hits class

Posted by Doug Cutting <cu...@apache.org>.
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