Interface SearchProjectionBuilderFactory
-
- All Known Implementing Classes:
ElasticsearchSearchProjectionBuilderFactory,LuceneSearchProjectionBuilderFactory
public interface SearchProjectionBuilderFactoryA factory for search projection builders.This is the main entry point for the engine to ask the backend to build search projections.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> SearchProjection<T>byTypeName(Map<String,? extends SearchProjection<? extends T>> inners)CompositeProjectionBuildercomposite()<T> SearchProjection<T>constant(T value)SearchProjection<DocumentReference>documentReference()<T> SearchProjection<T>entityComposite(SearchProjection<T> delegate)<E> SearchProjection<E>entityLoading()<R> SearchProjection<R>entityReference()<I> SearchProjection<I>id(Class<I> requestedIdentifierType)SearchProjection<Float>score()<T> SearchProjection<T>throwing(Supplier<SearchException> exceptionSupplier)
-
-
-
Method Detail
-
documentReference
SearchProjection<DocumentReference> documentReference()
-
entityLoading
<E> SearchProjection<E> entityLoading()
-
entityReference
<R> SearchProjection<R> entityReference()
-
id
<I> SearchProjection<I> id(Class<I> requestedIdentifierType)
-
score
SearchProjection<Float> score()
-
composite
CompositeProjectionBuilder composite()
-
constant
<T> SearchProjection<T> constant(T value)
-
entityComposite
<T> SearchProjection<T> entityComposite(SearchProjection<T> delegate)
-
throwing
<T> SearchProjection<T> throwing(Supplier<SearchException> exceptionSupplier)
- Type Parameters:
T- The type of projected values.- Parameters:
exceptionSupplier- A supplier of the exception to throw.- Returns:
- A projection that throws an exception as soon as it's applied to at least one document.
-
byTypeName
<T> SearchProjection<T> byTypeName(Map<String,? extends SearchProjection<? extends T>> inners)
- Type Parameters:
T- The type of projected values.- Parameters:
inners- A map from type name to projection.- Returns:
- A projection that delegates to the given projections, picking the delegate based on the document's type name.
-
-