Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-807: Fixed the javadoc for ScoreDocComparator.compare() to be consistent with java.util.Comparator.compare()

Michael Buschcb8896179227
diff --git a/CHANGES.txt b/CHANGES.txt
index 68bd54ae4c0..508658e8538 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -98,6 +98,12 @@ Optimizations
Documentation:
1. LUCENE 791 && INFRA-1173: Infrastructure moved the Wiki to http://wiki.apache.org/lucene-java/ Updated the links in the docs and wherever else I found references. (Grant Ingersoll, Joe Schaefer)
+
+ 2. Fixed the javadoc for ScoreDocComparator.compare() to be consistent with
+ java.util.Comparator.compare(): Any integer is allowed to be returned
+ instead of only -1/0/1.
+ (Paul Cowan via Michael Busch)
+
======================= Release 2.1.0 2007-02-14 =======================
Changes in runtime behavior
diff --git a/src/java/org/apache/lucene/search/ScoreDocComparator.java b/src/java/org/apache/lucene/search/ScoreDocComparator.java
index c7fd4332dbf..f04471b56b4 100644
--- a/src/java/org/apache/lucene/search/ScoreDocComparator.java
+++ b/src/java/org/apache/lucene/search/ScoreDocComparator.java
@@ -64,8 +64,8 @@ public interface ScoreDocComparator {
* sort order.
* @param i First ScoreDoc
* @param j Second ScoreDoc
- * @return <code>-1</code> if <code>i</code> should come before <code>j</code><br>
- * <code>1</code> if <code>i</code> should come after <code>j</code><br>
+ * @return a negative integer if <code>i</code> should come before <code>j</code><br>
+ * a positive integer if <code>i</code> should come after <code>j</code><br>
* <code>0</code> if they are equal
* @see java.util.Comparator
*/