public abstract class SearchSort extends Object
Base class for all FTS sort options in querying.
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()
The identifier for the sort type, used in the “by” field.
public void injectParams(JsonObject queryJson)
public SearchSort descending(boolean descending)
public static SearchSortId sortId()
Sort by the document identifier.
public static SearchSortScore sortScore()
Sort by the hit score.
public static SearchSortField sortField(String field)
Sort by a field in the hits.
field
- the field name.public static SearchSortGeoDistance sortGeoDistance(double locationLon, double locationLat, String field)
Sort by geo location.
locationLon
- longitude of the location.locationLat
- latitude of the location.field
- the field name.Copyright © 2015 Couchbase, Inc.