Class SortOptions (2.0.0)

public final class SortOptions

Definition of how to sort documents. You may specify zero or more sort expressions and set a match scorer. If you have a large index, it is advisable to set a limit.

Inheritance

java.lang.Object > SortOptions

Static Methods

newBuilder()

public static SortOptions.Builder newBuilder()

Creates and returns a SortOptions Builder.

Returns
TypeDescription
SortOptions.Builder

a new SortOptions.Builder. Set the parameters for SortOptions on the Builder, and use the Builder#build() method to create a concrete instance of SortOptions

Methods

getLimit()

public int getLimit()
Returns
TypeDescription
int

the limit on the number of documents to score or sort

getMatchScorer()

public MatchScorer getMatchScorer()
Returns
TypeDescription
MatchScorer

a MatchScorer used to score the documents

getSortExpressions()

public List<SortExpression> getSortExpressions()
Returns
TypeDescription
List<SortExpression>

a list of sort expressions representing a multi-dimensional sort

toString()

public String toString()
Returns
TypeDescription
String
Overrides