Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ public int compare(ScoreDoc doc1, ScoreDoc doc2) {
}

public String value(ScoreDoc doc) {
if (values.lookup[values.order[doc.doc]] == null) {
return null;
}

return String.valueOf(values.lookup[values.order[doc.doc]]);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ public static class ReverseComparable implements Comparable,Serializable{
public int compareTo(Object o) {
if (o instanceof ReverseComparable){
Comparable inner = ((ReverseComparable)o)._inner;

if (_inner == null) {
if (inner == null) {
return 0;
}
return 1;
} else if (inner == null) {
return -1;
}

return -_inner.compareTo(inner);
}
else{
Expand Down