public final class SortOptionsDefinition 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.
Static Methods
newBuilder()
public static SortOptions.Builder newBuilder()Creates and returns a SortOptions Builder.
| Returns | |
|---|---|
| Type | Description | 
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 | |
|---|---|
| Type | Description | 
int | 
        the limit on the number of documents to score or sort  | 
      
getMatchScorer()
public MatchScorer getMatchScorer()| Returns | |
|---|---|
| Type | Description | 
MatchScorer | 
        a MatchScorer used to score the documents  | 
      
getSortExpressions()
public List<SortExpression> getSortExpressions()| Returns | |
|---|---|
| Type | Description | 
List<SortExpression> | 
        a list of sort expressions representing a multi-dimensional sort  | 
      
toString()
public String toString()| Returns | |
|---|---|
| Type | Description | 
String | 
        |