Hello,
the original post is here :
http://www.nabble.com/Question-about-hits-scores-tf3332761.html
http://www.nabble.com/Question-about-hits-scores-tf3332761.html
but I am re-explaining my problem.
here is the query I am sending to lucene :
+(document_type:type0one +document_type:type0twenty0one) +state:live0
document_type and state are meta-datas. 0 is used as a separator in
"type0one " and "type0twenty0one".
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
searcher.setSimilarity(similarity);
hits=searcher.search(l_query);
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: http://www.nabble.com/Searching-by-metadata-dand-score-issue-tf3333361.html#a9268781
Sent from the Lucene - General mailing list archive at Nabble.com.
the original post is here :
http://www.nabble.com/Question-about-hits-scores-tf3332761.html
http://www.nabble.com/Question-about-hits-scores-tf3332761.html
but I am re-explaining my problem.
here is the query I am sending to lucene :
+(document_type:type0one +document_type:type0twenty0one) +state:live0
document_type and state are meta-datas. 0 is used as a separator in
"type0one " and "type0twenty0one".
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
searcher.setSimilarity(similarity);
hits=searcher.search(l_query);
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: http://www.nabble.com/Searching-by-metadata-dand-score-issue-tf3333361.html#a9268781
Sent from the Lucene - General mailing list archive at Nabble.com.