lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jreeman <>
Subject Searching by metadata dand score issue
Date Fri, 02 Mar 2007 12:33:18 GMT


the original post is here : 

but I am re-explaining my problem.

here is the query I am sending to lucene :

+(document_type:type0one +document_type:type0twenty0one) 

document_type is q meta-data. 0 is used as a separator in "type0one " and

And the result, hits returned :

1 hit type0one, score 100%
1 hit type0twenty0one, score 80%
1 hit type0twenty0one, score 80% 

The rarer document have a score higher than other, that's why all the hits
doesn't have the same score.

However that's what I would appreciate so I used my own Similarity class
like this :

DefaultSimilarity similarity = new DefaultSimilarity();
similarity.idf(0, 1); // idf is set to 1 whithis line of code

But it doesn't affect the score. I always have
1 hit type0one, score 100%
2 hits type0twenty0one, score 80%

Do you have suggestions to get all the hits with a score of 100% ?
View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message