public abstract class SearchSort extends Object
Modifier | Constructor and Description |
---|---|
protected |
SearchSort() |
Modifier and Type | Method and Description |
---|---|
static SearchSortField |
byField(String field)
Sort by a field in the rows.
|
static SearchSortGeoDistance |
byGeoDistance(double locationLon,
double locationLat,
String field)
Sort by geo location.
|
static SearchSortId |
byId()
Sort by the document identifier.
|
static SearchSortScore |
byScore()
Sort by the hit score.
|
SearchSort |
desc(boolean descending) |
protected abstract String |
identifier()
The identifier for the sort type, used in the "by" field.
|
void |
injectParams(JsonObject queryJson) |
protected abstract String identifier()
public void injectParams(JsonObject queryJson)
public SearchSort desc(boolean descending)
public static SearchSortId byId()
public static SearchSortScore byScore()
public static SearchSortField byField(String field)
field
- the field name.public static SearchSortGeoDistance byGeoDistance(double locationLon, double locationLat, String field)
locationLon
- longitude of the location.locationLat
- latitude of the location.field
- the field name.Copyright © 2020 Couchbase, Inc.. All rights reserved.