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 Details Link icon

    • descending Link icon

      protected boolean descending
  • Constructor Details Link icon

    • SearchSort Link icon

      protected SearchSort()
  • Method Details Link icon

    • toCore Link icon

      @Internal public abstract CoreSearchSort toCore()
    • desc Link icon

      public SearchSort desc(boolean descending)
    • byId Link icon

      public static SearchSortId byId()
      Sort by the document identifier.
    • byScore Link icon

      public static SearchSortScore byScore()
      Sort by the hit score.
    • byField Link icon

      public static SearchSortField byField(String field)
      Sort by a field in the rows.
      Parameters:
      field - the field name.
    • byGeoDistance Link icon

      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.