mirror of https://github.com/apache/lucene.git
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:
parent
b5e9539954
commit
18efb159ef
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue