Update the result score result field with the result queue ranking value to reflect
the actual calculated/used score,
for rwi & solr stack results.
(calc. etc. is unchanged, it's just that result entry carries the latest val
as api retrieves the number from it)
@ -978,9 +978,15 @@ public final class SearchEvent {
this.urlhashes.putUnique(iEntry.hash());
rankingtryloop:while(true){
try{
longscore=(long)Math.max(0,(1000000.0f*iEntry.score())-iEntry.urllength());// we modify the score here since the solr score is equal in many cases and then the order would simply depend on the url hash which would be silly
this.nodeStack.put(newReverseElement<URIMetadataNode>(iEntry,score==0?this.order.cardinal(iEntry):score));// inserts the element and removes the worst (which is smallest)
longscore;
// determine nodestack ranking (will be altered by postranking)
// so far Solr score is used (with abitrary factor to get value similar to rwi ranking values)
Floatscorex=(Float)iEntry.getFieldValue("score");// this is a special field containing the ranking score of a Solr search result
if(scorex!=null&&scorex>0)
score=(long)((1000000.0f*scorex)-iEntry.urllength());// we modify the score here since the solr score is equal in many cases and then the order would simply depend on the url hash which would be silly
else
score=this.order.cardinal(iEntry);
this.nodeStack.put(newReverseElement<URIMetadataNode>(iEntry,score));// inserts the element and removes the worst (which is smallest)
breakrankingtryloop;
}catch(finalArithmeticExceptione){
// this may happen if the concurrent normalizer changes values during cardinal computation
@ -1008,7 +1014,7 @@ public final class SearchEvent {