public class SortElement extends DslCloneable
SortElement.Type.RELEVANCY
sorts by relevancy descending. The rest of parameters are ignored.
SortElement.Type.FIELD
sorts by a field specified in getValue()
in getOrder()
SortElement.Type.EXPRESSION
sorts by an expression specified in getValue()
in getOrder()
SortElement.Type.QUERY
sorts by a query specified in getQuery()
()} in getOrder()
Modifier and Type | Class and Description |
---|---|
static class |
SortElement.Order
Sorting order
|
static class |
SortElement.Type
Sort element type
|
Constructor and Description |
---|
SortElement(SortElement.Type type,
String value,
SortElement.Order order,
Query query) |
Modifier and Type | Method and Description |
---|---|
SortElement |
clone() |
SortElement.Order |
getOrder() |
Query |
getQuery() |
SortElement.Type |
getType() |
String |
getValue() |
void |
setValue(String value) |
clone, deepClone
public SortElement(SortElement.Type type, String value, SortElement.Order order, Query query)
public String getValue()
SortElement.Type.FIELD
and sort expresion for SortElement.Type.EXPRESSION
.
Ignored for other typespublic void setValue(String value)
public SortElement.Order getOrder()
SortElement.Type.RELEVANCY
public SortElement.Type getType()
SortElement.Type
of sort elementpublic Query getQuery()
SortElement.Type.QUERY
public SortElement clone()
clone
in class DslCloneable