Interface ExtendedSearchSortFactory<SR,S extends ExtendedSearchSortFactory<SR,?,PDF>,PDF extends TypedSearchPredicateFactory<SR>>

Type Parameters:
SR - Scope root type.
S - The self type, i.e. the exposed type of this factory.
PDF - The type of factory used to create predicates in SortFilterStep.filter(Function).
All Superinterfaces:
SearchSortFactory, TypedSearchSortFactory<SR>
All Known Subinterfaces:
ElasticsearchSearchSortFactory<SR>, LuceneSearchSortFactory<SR>
All Known Implementing Classes:
AbstractSearchSortFactory

public interface ExtendedSearchSortFactory<SR,S extends ExtendedSearchSortFactory<SR,?,PDF>,PDF extends TypedSearchPredicateFactory<SR>> extends TypedSearchSortFactory<SR>
A base interface for subtypes of TypedSearchSortFactory allowing to easily override the self type and predicate factory type for all relevant methods.

Warning: Generic parameters of this type are subject to change, so this type should not be referenced directly in user code.

  • Method Details

    • withRoot

      S withRoot(String objectFieldPath)
      Description copied from interface: TypedSearchSortFactory
      Create a new sort factory whose root for all paths passed to the DSL will be the given object field.

      This is used to call reusable methods that can apply the same sort on different object fields that have same structure (same sub-fields).

      Specified by:
      withRoot in interface SearchSortFactory
      Specified by:
      withRoot in interface TypedSearchSortFactory<SR>
      Parameters:
      objectFieldPath - The path from the current root to an object field that will become the new root.
      Returns:
      A new sort factory using the given object field as root.
    • field

      FieldSortOptionsStep<SR,?,PDF> field(String fieldPath)
      Description copied from interface: TypedSearchSortFactory
      Order elements by the value of a specific field.

      The default order is ascending.

      Specified by:
      field in interface SearchSortFactory
      Specified by:
      field in interface TypedSearchSortFactory<SR>
      Parameters:
      fieldPath - The path to the index field to sort by.
      Returns:
      A DSL step where the "field" sort can be defined in more details.
    • distance

      DistanceSortOptionsStep<SR,?,PDF> distance(String fieldPath, GeoPoint location)
      Description copied from interface: TypedSearchSortFactory
      Order elements by the distance from the location stored in the specified field to the location specified.

      The default order is ascending.

      Specified by:
      distance in interface SearchSortFactory
      Specified by:
      distance in interface TypedSearchSortFactory<SR>
      Parameters:
      fieldPath - The path to the index field containing the location to compute the distance from.
      location - The location to which we want to compute the distance.
      Returns:
      A DSL step where the "distance" sort can be defined in more details.
    • distance

      default DistanceSortOptionsStep<SR,?,PDF> distance(String fieldPath, double latitude, double longitude)
      Description copied from interface: TypedSearchSortFactory
      Order elements by the distance from the location stored in the specified field to the location specified.

      The default order is ascending.

      Specified by:
      distance in interface SearchSortFactory
      Specified by:
      distance in interface TypedSearchSortFactory<SR>
      Parameters:
      fieldPath - The path to the index field containing the location to compute the distance from.
      latitude - The latitude of the location to which we want to compute the distance.
      longitude - The longitude of the location to which we want to compute the distance.
      Returns:
      A DSL step where the "distance" sort can be defined in more details.
    • distance

      default DistanceSortOptionsStep<SR,?,PDF> distance(DistanceSortFieldReference<? super SR> fieldReference, GeoPoint location)
      Description copied from interface: TypedSearchSortFactory
      Order elements by the distance from the location stored in the specified field to the location specified.

      The default order is ascending.

      Specified by:
      distance in interface TypedSearchSortFactory<SR>
      Parameters:
      fieldReference - The field reference representing a definition of the index field containing the location to compute the distance from.
      location - The location to which we want to compute the distance.
      Returns:
      A DSL step where the "distance" sort can be defined in more details.
    • distance

      default DistanceSortOptionsStep<SR,?,PDF> distance(DistanceSortFieldReference<? super SR> fieldReference, double latitude, double longitude)
      Description copied from interface: TypedSearchSortFactory
      Order elements by the distance from the location stored in the specified field to the location specified.

      The default order is ascending.

      Specified by:
      distance in interface TypedSearchSortFactory<SR>
      Parameters:
      fieldReference - The field reference representing a definition of the index field containing the location to compute the distance from.
      latitude - The latitude of the location to which we want to compute the distance.
      longitude - The longitude of the location to which we want to compute the distance.
      Returns:
      A DSL step where the "distance" sort can be defined in more details.