Class SearchSort
java.lang.Object
com.couchbase.client.java.search.sort.SearchSort
- Direct Known Subclasses:
SearchSortField
,SearchSortGeoDistance
,SearchSortId
,SearchSortScore
Base class for all FTS sort options in querying.
- Since:
- 2.4.5
- Author:
- Michael Nitschinger
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SearchSortField
Sort by a field in the rows.static SearchSortGeoDistance
byGeoDistance
(double locationLon, double locationLat, String field) Sort by distance from a geographic location.static SearchSortId
byId()
Sort by the document identifier.static SearchSortScore
byScore()
Sort by the hit score.desc
(boolean descending) abstract CoreSearchSort
toCore()
-
Field Details
-
descending
protected boolean descending
-
-
Constructor Details
-
SearchSort
protected SearchSort()
-
-
Method Details
-
toCore
-
desc
-
byId
Sort by the document identifier. -
byScore
Sort by the hit score. -
byField
Sort by a field in the rows.- Parameters:
field
- the field name.
-
byGeoDistance
public static SearchSortGeoDistance byGeoDistance(double locationLon, double locationLat, String field) Sort by distance from a geographic location.- Parameters:
locationLon
- longitude of the location.locationLat
- latitude of the location.field
- the field name.
-