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 sri krishna <kr...@gmail.com> on 2012/11/27 18:38:22 UTC

handling different scores related to queries

for a search string hello*~ how the scoring is calculated?

as the formula given in the url:
http://lucene.apache.org/core/old_versioned_docs/versions/3_0_1/api/core/org/apache/lucene/search/Similarity.html,
doesn't take into consideration of edit distance(levenshtein distance) and
prefix term corresponding factors into account.

Does lucene add up the scores obtained from each type of query included i.e
for the above query actual score=default scoring+1/(edit distance)+prefix
match score ?, If so, there is no normalization between scores, else what
is the approach lucene follows starting from seperating each query based
identifiers like (~(edit distance), *(prefix query) etc) to actual scoring.

Re: handling different scores related to queries

Posted by Jack Krupansky <ja...@basetechnology.com>.
Call the IndexSearch#explain method to get the technical details on how any 
query is scored. Call Explanation#toString to get the English description 
for the scoring.

Or, using Solr, add the &debugQuery=true parameter to your query request and 
look at the "explain" section for scoring calculations.

Some of these complex queries are "constant score" for performance reasons.

-- Jack Krupansky

-----Original Message----- 
From: sri krishna
Sent: Tuesday, November 27, 2012 12:38 PM
To: java-user
Subject: handling different scores related to queries

for a search string hello*~ how the scoring is calculated?

as the formula given in the url:
http://lucene.apache.org/core/old_versioned_docs/versions/3_0_1/api/core/org/apache/lucene/search/Similarity.html,
doesn't take into consideration of edit distance(levenshtein distance) and
prefix term corresponding factors into account.

Does lucene add up the scores obtained from each type of query included i.e
for the above query actual score=default scoring+1/(edit distance)+prefix
match score ?, If so, there is no normalization between scores, else what
is the approach lucene follows starting from seperating each query based
identifiers like (~(edit distance), *(prefix query) etc) to actual scoring. 


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