Interface SearchQueryDslExtension<T,R,E,LOS>
- Type Parameters:
T
- The type of extended steps in the search query definition DSL. Should generally extendSearchQuerySelectStep
.R
- The reference type.E
- The entity type.LOS
- The type of the initial step of the loading options definition DSL.
- All Known Implementing Classes:
ElasticsearchExtension
,LuceneExtension
public interface SearchQueryDslExtension<T,R,E,LOS>
An extension to the search query DSL, allowing to set non-standard options on a query.
WARNING: while this type is API, because instances should be manipulated by users,
all of its methods are considered SPIs and therefore should never be called or implemented directly by users.
In short, users are only expected to get instances of this type from an API (SomeExtension.get()
)
and pass it to another API.
-
Method Summary
Modifier and TypeMethodDescriptionextendOptional
(SearchQuerySelectStep<?, R, E, LOS, ?, ?> original, SearchQueryIndexScope<?> scope, BackendSessionContext sessionContext, SearchLoadingContextBuilder<E, LOS> loadingContextBuilder) Attempt to extend a given DSL step, returning an emptyOptional
in case of failure.
-
Method Details
-
extendOptional
Optional<T> extendOptional(SearchQuerySelectStep<?, R, E, LOS, ?, ?> original, SearchQueryIndexScope<?> scope, BackendSessionContext sessionContext, SearchLoadingContextBuilder<E, LOS> loadingContextBuilder) Attempt to extend a given DSL step, returning an emptyOptional
in case of failure.WARNING: this method is not API, see comments at the type level.
- Parameters:
original
- The original, non-extendedSearchQuerySelectStep
.scope
- ASearchQueryIndexScope
.sessionContext
- ABackendSessionContext
.loadingContextBuilder
- ASearchLoadingContextBuilder
.- Returns:
- An optional containing the extended search query DSL step (
SearchQueryDslExtension
) in case of success, or an empty optional otherwise.
-