mirror of https://github.com/apache/lucene.git
LUCENE-1665: also deprecate short-hand ctors/setters in Sort that imply SortField.AUTO
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@795179 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eae3eea874
commit
e4a7f98d71
|
@ -130,6 +130,9 @@ implements Serializable {
|
||||||
* automatically.
|
* automatically.
|
||||||
*
|
*
|
||||||
* @see SortField#AUTO
|
* @see SortField#AUTO
|
||||||
|
* @deprecated Please specify the type explicitly by
|
||||||
|
* first creating a {@link SortField} and then use {@link
|
||||||
|
* #Sort(SortField)}
|
||||||
*/
|
*/
|
||||||
public Sort(String field) {
|
public Sort(String field) {
|
||||||
setSort(field, false);
|
setSort(field, false);
|
||||||
|
@ -141,6 +144,9 @@ implements Serializable {
|
||||||
* determined automatically.
|
* determined automatically.
|
||||||
*
|
*
|
||||||
* @see SortField#AUTO
|
* @see SortField#AUTO
|
||||||
|
* @deprecated Please specify the type explicitly by
|
||||||
|
* first creating a {@link SortField} and then use {@link
|
||||||
|
* #Sort(SortField)}
|
||||||
*/
|
*/
|
||||||
public Sort(String field, boolean reverse) {
|
public Sort(String field, boolean reverse) {
|
||||||
setSort(field, reverse);
|
setSort(field, reverse);
|
||||||
|
@ -151,6 +157,9 @@ implements Serializable {
|
||||||
* <code>field</code> is determined automatically.
|
* <code>field</code> is determined automatically.
|
||||||
*
|
*
|
||||||
* @see SortField#AUTO
|
* @see SortField#AUTO
|
||||||
|
* @deprecated Please specify the type explicitly by
|
||||||
|
* first creating {@link SortField}s and then use {@link
|
||||||
|
* #Sort(SortField[])}
|
||||||
*/
|
*/
|
||||||
public Sort(String[] fields) {
|
public Sort(String[] fields) {
|
||||||
setSort(fields);
|
setSort(fields);
|
||||||
|
@ -169,6 +178,9 @@ implements Serializable {
|
||||||
/**
|
/**
|
||||||
* Sets the sort to the terms in <code>field</code> then by index order
|
* Sets the sort to the terms in <code>field</code> then by index order
|
||||||
* (document number).
|
* (document number).
|
||||||
|
* @deprecated Please specify the type explicitly by
|
||||||
|
* first creating a {@link SortField} and then use {@link
|
||||||
|
* #setSort(SortField)}
|
||||||
*/
|
*/
|
||||||
public final void setSort(String field) {
|
public final void setSort(String field) {
|
||||||
setSort(field, false);
|
setSort(field, false);
|
||||||
|
@ -177,12 +189,18 @@ implements Serializable {
|
||||||
/**
|
/**
|
||||||
* Sets the sort to the terms in <code>field</code> possibly in reverse,
|
* Sets the sort to the terms in <code>field</code> possibly in reverse,
|
||||||
* then by index order (document number).
|
* then by index order (document number).
|
||||||
|
* @deprecated Please specify the type explicitly by
|
||||||
|
* first creating a {@link SortField} and then use {@link
|
||||||
|
* #setSort(SortField)}
|
||||||
*/
|
*/
|
||||||
public void setSort(String field, boolean reverse) {
|
public void setSort(String field, boolean reverse) {
|
||||||
fields = new SortField[] { new SortField(field, SortField.AUTO, reverse) };
|
fields = new SortField[] { new SortField(field, SortField.AUTO, reverse) };
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the sort to the terms in each field in succession. */
|
/** Sets the sort to the terms in each field in succession.
|
||||||
|
* @deprecated Please specify the type explicitly by
|
||||||
|
* first creating {@link SortField}s and then use {@link
|
||||||
|
* #setSort(SortField[])} */
|
||||||
public void setSort(String[] fieldnames) {
|
public void setSort(String[] fieldnames) {
|
||||||
final int n = fieldnames.length;
|
final int n = fieldnames.length;
|
||||||
SortField[] nfields = new SortField[n];
|
SortField[] nfields = new SortField[n];
|
||||||
|
|
Loading…
Reference in New Issue