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
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
descending
-
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 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)
abstract com.couchbase.client.core.api.search.sort.CoreSearchSort
toCore()
-
-
-
Method Detail
-
toCore
@Internal public abstract com.couchbase.client.core.api.search.sort.CoreSearchSort toCore()
-
desc
public SearchSort desc(boolean descending)
-
byId
public static SearchSortId byId()
Sort by the document identifier.
-
byScore
public static SearchSortScore byScore()
Sort by the hit score.
-
byField
public static SearchSortField byField(String field)
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 geo location.- Parameters:
locationLon
- longitude of the location.locationLat
- latitude of the location.field
- the field name.
-
-