LUCENE-6057: improve Sort(SortField) docs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1639581 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2014-11-14 08:30:53 +00:00
parent b5e9539954
commit 18efb159ef
2 changed files with 12 additions and 2 deletions

View File

@ -258,6 +258,8 @@ Documentation
* LUCENE-5392: Add/improve analysis package documentation to reflect
analysis 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 codec

View File

@ -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;
}