lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brisbart Franck <Franck.Brisb...@kelkoo.net>
Subject Re: why the score is not always 1.0 when comparing two identical strings?
Date Fri, 04 Jun 2004 14:38:14 GMT
You're not the first one to ask this question.
I suggest you to have a look in the mailing list archive and to search 
for the messages 'Lucene Scoring Behavior'.
Here is the link below:
http://issues.apache.org/eyebrowse/SearchList?listId=&listName=lucene-user%40jakarta.apache.org&searchText=%22lucene+scoring+behavior%22&defaultField=subject&Search=Search

Cheers,
Franck

uddam chukmol wrote:
> hi,
>  
> i'm not so convinced by the way Lucene compute the score. 
>  
> I tried to compare two string by using a program. In the program, i index the first string
as if i indexed a document and use the queryParser with the same analyzer that I used to index
the first string to analyze my second string and to form a query from it. 
> 
> I run the program for the first time with the first string as: 
> "This is the text to index with Lucene CREATE TABLE Elements ( TYPELEMENT varchar (255)
NULL , CLEELEMENT varchar (255) NULL , LIBELEM varchar (255) NULL , CODENTITE varchar (255)
NULL , CLEENTITE varchar (255) NULL , DONNNEEA1 varchar (255) NULL , DONNEEB1 varchar (255)
NULL , DONNEEA2 varchar (255) NULL , DONNEEB2 varchar (255) NULL , DONNEEA3 varchar (255)
NULL , DONNEEB3 varchar (255) NULL , DONNEEA4 varchar (255) NULL , DONNEEB4 varchar (255)
NULL , DONNEEA5 varchar (255) NULL , DONNEEB5 varchar (255) NULL , TOP1 varchar (255) NULL
, TOP2 varchar (255) NULL , TOP3 varchar (255) NULL , TOP4 varchar (255) NULL , TOP5 varchar
(255) NULL , QTE1 varchar (255) NULL , QTE2 varchar (255) NULL , QTE3 varchar (255) NULL ,
MONTANT1 varchar (255) NULL , MONTANT2 varchar (255) NULL , MONTANT3 varchar (255) NULL ,
DATE1 varchar (255) NULL , DATE2 varchar (255) NULL , DATE3 varchar (255) NULL , STATUT varchar
(255) NULL , DATPRISENCPTSTAT varchar (255) NULL )".
>  
> I used the same string as to form my query and i got the final score of these two string
which is 1.0.
>  
> Then something suprised me when i changed to two strings into "All work and no play makes
Jack a dull boy" and compared them by using one as a document and other to form the query.
The result was just not 1.0. it was 0.3033.. instead. 
>  
> I used Eclipse as my Java Editor. Any conflict with Lucene?
>  
> Any idea/suggestion of what went wrong over here?
>  
> Uddam
> 
> 		
> ---------------------------------
> Do you Yahoo!?
> Friends.  Fun. Try the all-new Yahoo! Messenger


-- 
Franck Brisbart
R&D
http://www.kelkoo.com


---------------------------------------------------------------------
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