Class SearchSort

    • Constructor Detail

      • SearchSort

        protected SearchSort()
    • 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 hits.
        field - the field name.
      • sortGeoDistance

        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.