Interface ExtendedSearchSortFactory<S extends ExtendedSearchSortFactory<?,​PDF>,​PDF extends SearchPredicateFactory>

    • Method Detail

      • withRoot

        S withRoot​(String objectFieldPath)
        Description copied from interface: SearchSortFactory
        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
        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<?,​PDF> field​(String fieldPath)
        Description copied from interface: SearchSortFactory
        Order elements by the value of a specific field.

        The default order is ascending.

        Specified by:
        field in interface SearchSortFactory
        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<?,​PDF> distance​(String fieldPath,
                                                      GeoPoint location)
        Description copied from interface: SearchSortFactory
        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
        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<?,​PDF> distance​(String fieldPath,
                                                              double latitude,
                                                              double longitude)
        Description copied from interface: SearchSortFactory
        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
        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.