mirror of https://github.com/apache/lucene.git
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:
parent
0a0dcefb95
commit
c6482c1488
|
@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue