Class SearchSort
- java.lang.Object
-
- com.couchbase.client.java.search.sort.SearchSort
-
- Direct Known Subclasses:
SearchSortField
,SearchSortGeoDistance
,SearchSortId
,SearchSortScore
public abstract class SearchSort extends Object
Base class for all FTS sort options in querying.- Since:
- 2.4.5
- Author:
- Michael Nitschinger
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SearchSort()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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 rows.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.
-
-
-
Method Detail
-
identifier
protected abstract String identifier()
The identifier for the sort type, used in the "by" field.
-
injectParams
public void injectParams(JsonObject queryJson)
-
descending
public SearchSort descending(boolean descending)
-
sortId
public static SearchSortId sortId()
Sort by the document identifier.
-
sortScore
public static SearchSortScore sortScore()
Sort by the hit score.
-
sortField
public static SearchSortField sortField(String field)
Sort by a field in the rows.- Parameters:
field
- the field name.
-
sortGeoDistance
public static SearchSortGeoDistance sortGeoDistance(double locationLon, double locationLat, String field)
Sort by geo location.- Parameters:
locationLon
- longitude of the location.locationLat
- latitude of the location.field
- the field name.
-
-