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 inSortFilterStep.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 Summary
Modifier and TypeMethodDescriptiondefault DistanceSortOptionsStep<SR, ?, 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.default DistanceSortOptionsStep<SR, ?, PDF> distance(DistanceSortFieldReference<? super SR> fieldReference, double latitude, double longitude) Order elements by the distance from the location stored in the specified field to the location specified.default DistanceSortOptionsStep<SR, ?, PDF> distance(DistanceSortFieldReference<? super SR> fieldReference, GeoPoint location) 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
extension, toAbsolutePathMethods inherited from interface org.hibernate.search.engine.search.sort.dsl.TypedSearchSortFactory
composite, composite, extension, field, indexOrder, score, withParameters
-
Method Details
-
withRoot
Description copied from interface:TypedSearchSortFactoryCreate 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:
withRootin interfaceSearchSortFactory- Specified by:
withRootin interfaceTypedSearchSortFactory<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
Description copied from interface:TypedSearchSortFactoryOrder elements by the value of a specific field.The default order is ascending.
- Specified by:
fieldin interfaceSearchSortFactory- Specified by:
fieldin interfaceTypedSearchSortFactory<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
Description copied from interface:TypedSearchSortFactoryOrder elements by the distance from the location stored in the specified field to the location specified.The default order is ascending.
- Specified by:
distancein interfaceSearchSortFactory- Specified by:
distancein interfaceTypedSearchSortFactory<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,?, distancePDF> (String fieldPath, double latitude, double longitude) Description copied from interface:TypedSearchSortFactoryOrder elements by the distance from the location stored in the specified field to the location specified.The default order is ascending.
- Specified by:
distancein interfaceSearchSortFactory- Specified by:
distancein interfaceTypedSearchSortFactory<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,?, distancePDF> (DistanceSortFieldReference<? super SR> fieldReference, GeoPoint location) Description copied from interface:TypedSearchSortFactoryOrder elements by the distance from the location stored in the specified field to the location specified.The default order is ascending.
- Specified by:
distancein interfaceTypedSearchSortFactory<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,?, distancePDF> (DistanceSortFieldReference<? super SR> fieldReference, double latitude, double longitude) Description copied from interface:TypedSearchSortFactoryOrder elements by the distance from the location stored in the specified field to the location specified.The default order is ascending.
- Specified by:
distancein interfaceTypedSearchSortFactory<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.
-