Apache Solr open-source search software
LUCENE-6057: improve Sort(SortField) docs
Michael McCandless18efb159ef05
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex a7d22dc8aab..2a2a5a83ca7 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -258,6 +258,8 @@ Documentation* LUCENE-5392: Add/improve analysis package documentation to reflectanalysis API changes. (Benson Margulies via Robert Muir - pull request #17)+* LUCENE-6057: Improve Sort(SortField) docs (Martin Braun via Mike McCandless)+Tests* LUCENE-5957: Add option for tests to not randomize codecdiff --git a/lucene/core/src/java/org/apache/lucene/search/Sort.java b/lucene/core/src/java/org/apache/lucene/search/Sort.javaindex 57630635d20..eee5a6e15a3 100644--- a/lucene/core/src/java/org/apache/lucene/search/Sort.java+++ b/lucene/core/src/java/org/apache/lucene/search/Sort.java@@ -127,7 +127,11 @@ public class Sort {setSort(field);}- /** Sorts in succession by the criteria in each SortField. */+ /** Sets the sort to the given criteria in succession: the+ * first SortField is checked first, but if it produces a+ * tie, then the second SortField is used to break the tie,+ * etc. Finally, if there is still a tie after all SortFields+ * are checked, the internal Lucene docid is used to break it. */public Sort(SortField... fields) {setSort(fields);}@@ -137,7 +141,11 @@ public class Sort {this.fields = new SortField[] { field };}- /** Sets the sort to the given criteria in succession. */+ /** Sets the sort to the given criteria in succession: the+ * first SortField is checked first, but if it produces a+ * tie, then the second SortField is used to break the tie,+ * etc. Finally, if there is still a tie after all SortFields+ * are checked, the internal Lucene docid is used to break it. */public void setSort(SortField... fields) {this.fields = fields;}