lucene-solr scale function reutuns minTarget when having same scores for all the items in the result set
up vote
0
down vote
favorite
I want to normalize the score for a particular query relative to the result set for the query and filter out only more relevant results based on a threshold.
I am using the scale function to normalize scores of result as below and using the normalized score to filter the results which exceeds a threshold using the range function
"{!func}scale(query({!edismax v=$q}), 0, 100)"
When result contains exactly one item or multiple items with (scaleInfo.maxVal-scaleInfo.minVal==0) same score, scale function returns minTarget value as the normalized score. As the value is less than the threshold, a valid result may not appear in the final output.
In scale function scale calculated as zero for the scenario (scaleInfo.maxVal-scaleInfo.minVal==0) ? 0 ) which i guess the issue
final float scale = (scaleInfo.maxVal-scaleInfo.minVal==0) ? 0 : (max-min)/(scaleInfo.maxVal-scaleInfo.minVal);
Is the above usage of scale (normalization) is correct ?
Is my observation regrinding the scale function is correct ?
How should i handle the scenario ? or is it a bug in the scale function ?
solr lucene scale normalization
add a comment |
up vote
0
down vote
favorite
I want to normalize the score for a particular query relative to the result set for the query and filter out only more relevant results based on a threshold.
I am using the scale function to normalize scores of result as below and using the normalized score to filter the results which exceeds a threshold using the range function
"{!func}scale(query({!edismax v=$q}), 0, 100)"
When result contains exactly one item or multiple items with (scaleInfo.maxVal-scaleInfo.minVal==0) same score, scale function returns minTarget value as the normalized score. As the value is less than the threshold, a valid result may not appear in the final output.
In scale function scale calculated as zero for the scenario (scaleInfo.maxVal-scaleInfo.minVal==0) ? 0 ) which i guess the issue
final float scale = (scaleInfo.maxVal-scaleInfo.minVal==0) ? 0 : (max-min)/(scaleInfo.maxVal-scaleInfo.minVal);
Is the above usage of scale (normalization) is correct ?
Is my observation regrinding the scale function is correct ?
How should i handle the scenario ? or is it a bug in the scale function ?
solr lucene scale normalization
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to normalize the score for a particular query relative to the result set for the query and filter out only more relevant results based on a threshold.
I am using the scale function to normalize scores of result as below and using the normalized score to filter the results which exceeds a threshold using the range function
"{!func}scale(query({!edismax v=$q}), 0, 100)"
When result contains exactly one item or multiple items with (scaleInfo.maxVal-scaleInfo.minVal==0) same score, scale function returns minTarget value as the normalized score. As the value is less than the threshold, a valid result may not appear in the final output.
In scale function scale calculated as zero for the scenario (scaleInfo.maxVal-scaleInfo.minVal==0) ? 0 ) which i guess the issue
final float scale = (scaleInfo.maxVal-scaleInfo.minVal==0) ? 0 : (max-min)/(scaleInfo.maxVal-scaleInfo.minVal);
Is the above usage of scale (normalization) is correct ?
Is my observation regrinding the scale function is correct ?
How should i handle the scenario ? or is it a bug in the scale function ?
solr lucene scale normalization
I want to normalize the score for a particular query relative to the result set for the query and filter out only more relevant results based on a threshold.
I am using the scale function to normalize scores of result as below and using the normalized score to filter the results which exceeds a threshold using the range function
"{!func}scale(query({!edismax v=$q}), 0, 100)"
When result contains exactly one item or multiple items with (scaleInfo.maxVal-scaleInfo.minVal==0) same score, scale function returns minTarget value as the normalized score. As the value is less than the threshold, a valid result may not appear in the final output.
In scale function scale calculated as zero for the scenario (scaleInfo.maxVal-scaleInfo.minVal==0) ? 0 ) which i guess the issue
final float scale = (scaleInfo.maxVal-scaleInfo.minVal==0) ? 0 : (max-min)/(scaleInfo.maxVal-scaleInfo.minVal);
Is the above usage of scale (normalization) is correct ?
Is my observation regrinding the scale function is correct ?
How should i handle the scenario ? or is it a bug in the scale function ?
solr lucene scale normalization
solr lucene scale normalization
asked Nov 8 at 8:25
Rimash Mohomed
4618
4618
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203853%2flucene-solr-scale-function-reutuns-mintarget-when-having-same-scores-for-all-the%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password