Modifier and Type | Method and Description |
---|---|
static Bson |
ascending(List<String> fieldNames)
Create a sort specification for an ascending sort on the given fields.
|
static Bson |
ascending(String... fieldNames)
Create a sort specification for an ascending sort on the given fields.
|
static Bson |
descending(List<String> fieldNames)
Create a sort specification for an ascending sort on the given fields.
|
static Bson |
descending(String... fieldNames)
Create a sort specification for an ascending sort on the given fields.
|
static Bson |
metaTextScore(String fieldName)
Create a sort specification for the text score meta projection on the given field.
|
static Bson |
orderBy(Bson... sorts)
Combine multiple sort specifications.
|
static Bson |
orderBy(List<? extends Bson> sorts)
Combine multiple sort specifications.
|
public static Bson ascending(String... fieldNames)
fieldNames
- the field names, which must contain at least onepublic static Bson ascending(List<String> fieldNames)
fieldNames
- the field names, which must contain at least onepublic static Bson descending(String... fieldNames)
fieldNames
- the field names, which must contain at least onepublic static Bson descending(List<String> fieldNames)
fieldNames
- the field names, which must contain at least onepublic static Bson metaTextScore(String fieldName)
fieldName
- the field namepublic static Bson orderBy(Bson... sorts)
sorts
- the sort specifications