public abstract class SearchSort extends Object
Modifier | Constructor and Description |
---|---|
protected |
SearchSort() |
Modifier and Type | Method and Description |
---|---|
SearchSort |
descending(boolean descending) |
protected abstract String |
identifier()
The identifier for the sort type, used in the "by" field.
|
void |
injectParams(JsonObject queryJson) |
static SearchSortField |
sortField(String field)
Sort by a field in the hits.
|
static SearchSortGeoDistance |
sortGeoDistance(double locationLon,
double locationLat,
String field)
Sort by geo location.
|
static SearchSortId |
sortId()
Sort by the document identifier.
|
static SearchSortScore |
sortScore()
Sort by the hit score.
|
protected abstract String identifier()
public void injectParams(JsonObject queryJson)
public SearchSort descending(boolean descending)
public static SearchSortId sortId()
public static SearchSortScore sortScore()
public static SearchSortField sortField(String field)
field
- the field name.public static SearchSortGeoDistance sortGeoDistance(double locationLon, double locationLat, String field)
locationLon
- longitude of the location.locationLat
- latitude of the location.field
- the field name.Copyright © 2015 Couchbase, Inc.