Interface ExtendedSearchSortFactory<S extends ExtendedSearchSortFactory<?,PDF>,PDF extends SearchPredicateFactory>
- Type Parameters:
S
- The self type, i.e. the exposed type of this factory.PDF
- The type of factory used to create predicates inSortFilterStep.filter(Function)
.
- All Superinterfaces:
SearchSortFactory
- All Known Subinterfaces:
ElasticsearchSearchSortFactory
,LuceneSearchSortFactory
- All Known Implementing Classes:
AbstractSearchSortFactory
public interface ExtendedSearchSortFactory<S extends ExtendedSearchSortFactory<?,PDF>,PDF extends SearchPredicateFactory>
extends SearchSortFactory
A base interface for subtypes of
SearchSortFactory
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 Summary
Modifier and TypeMethodDescriptiondefault DistanceSortOptionsStep
<?, PDF> Order elements by the distance from the location stored in the specified field to the location specified.Order elements by the distance from the location stored in the specified field to the location specified.Order elements by the value of a specific field.Create a new sort factory whose root for all paths passed to the DSL will be the given object field.Methods inherited from interface org.hibernate.search.engine.search.sort.dsl.SearchSortFactory
composite, composite, extension, extension, indexOrder, score, toAbsolutePath, withParameters
-
Method Details
-
withRoot
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 interfaceSearchSortFactory
- 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
Description copied from interface:SearchSortFactory
Order elements by the value of a specific field.The default order is ascending.
- Specified by:
field
in interfaceSearchSortFactory
- 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
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 interfaceSearchSortFactory
- 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 interfaceSearchSortFactory
- 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.
-