Class SortElement
- java.lang.Object
-
- com.lucidworks.search.dsl.DslBase
-
- com.lucidworks.search.dsl.request.DslCloneable
-
- com.lucidworks.search.dsl.request.SortElement
-
public class SortElement extends DslCloneable
An element of sorting order. It has multiple types:SortElement.Type.RELEVANCY
sorts by relevancy descending. The rest of parameters are ignored.SortElement.Type.FIELD
sorts by a field specified ingetValue()
ingetOrder()
SortElement.Type.EXPRESSION
sorts by an expression specified ingetValue()
ingetOrder()
SortElement.Type.QUERY
sorts by a query specified ingetQuery()
()} ingetOrder()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SortElement.Order
Sorting orderstatic class
SortElement.Type
Sort element type
-
Constructor Summary
Constructors Constructor Description SortElement(SortElement.Type type, java.lang.String value, SortElement.Order order, Query query)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortElement
clone()
SortElement.Order
getOrder()
Query
getQuery()
SortElement.Type
getType()
java.lang.String
getValue()
void
setValue(java.lang.String value)
-
Methods inherited from class com.lucidworks.search.dsl.request.DslCloneable
clone, deepClone
-
-
-
-
Constructor Detail
-
SortElement
public SortElement(SortElement.Type type, java.lang.String value, SortElement.Order order, Query query)
-
-
Method Detail
-
getValue
public java.lang.String getValue()
- Returns:
- field name for
SortElement.Type.FIELD
and sort expresion forSortElement.Type.EXPRESSION
. Ignored for other types
-
setValue
public void setValue(java.lang.String value)
-
getOrder
public SortElement.Order getOrder()
- Returns:
- Sorting order. Ignored for
SortElement.Type.RELEVANCY
-
getType
public SortElement.Type getType()
- Returns:
SortElement.Type
of sort element
-
getQuery
public Query getQuery()
- Returns:
- Sorting query. Only used with
SortElement.Type.QUERY
-
clone
public SortElement clone()
- Specified by:
clone
in classDslCloneable
-
-