SOLR-6692: Don't round highlight fragment scores for ordering purposes

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1673185 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David Wayne Smiley 2015-04-13 13:48:57 +00:00
parent 0a0dcefb95
commit c6482c1488
1 changed files with 1 additions and 1 deletions

View File

@ -564,7 +564,7 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements PluginInf
Collections.sort(frags, new Comparator<TextFragment>() {//TODO make TextFragment Comparable
@Override
public int compare(TextFragment arg0, TextFragment arg1) {
return Math.round(arg1.getScore() - arg0.getScore());
return Float.compare(arg1.getScore(), arg0.getScore());
}
});
}