Interface SearchProjectionBuilderFactory
public interface SearchProjectionBuilderFactory
A factory for search projection builders.
This is the main entry point for the engine to ask the backend to build search projections.
-
Method Summary
Modifier and TypeMethodDescription<T> SearchProjection<T> byTypeName(Map<String, ? extends SearchProjection<? extends T>> inners) <T> SearchProjection<T> constant(T value) <T> SearchProjection<T> entityComposite(SearchProjection<T> delegate) <E> SearchProjection<E> <R> SearchProjection<R> <I> SearchProjection<I> score()<T> SearchProjection<T> throwing(Supplier<SearchException> exceptionSupplier) <T> SearchProjection<T> withParameters(Function<? super NamedValues, ? extends ProjectionFinalStep<T>> projectionCreator)
-
Method Details
-
documentReference
SearchProjection<DocumentReference> documentReference() -
entityLoading
-
entityReference
-
id
-
score
SearchProjection<Float> score() -
composite
CompositeProjectionBuilder composite() -
constant
-
entityComposite
-
throwing
- 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
- 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.
-
withParameters
<T> SearchProjection<T> withParameters(Function<? super NamedValues, ? extends ProjectionFinalStep<T>> projectionCreator)
-