Class ElasticsearchSearchProjectionBuilderFactory
java.lang.Object
org.hibernate.search.backend.elasticsearch.search.projection.impl.ElasticsearchSearchProjectionBuilderFactory
- All Implemented Interfaces:
SearchProjectionBuilderFactory
public class ElasticsearchSearchProjectionBuilderFactory
extends Object
implements SearchProjectionBuilderFactory
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSearchProjectionBuilderFactory(SearchProjectionBackendContext searchProjectionBackendContext, ElasticsearchSearchIndexScope<?> scope) -
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>SearchProjection<com.google.gson.JsonObject><I> SearchProjection<I>SearchProjection<com.google.gson.JsonObject>jsonHit()score()SearchProjection<com.google.gson.JsonObject>source()<T> SearchProjection<T>throwing(Supplier<SearchException> exceptionSupplier) <T> SearchProjection<T>withParameters(Function<? super NamedValues, ? extends ProjectionFinalStep<T>> projectionCreator)
-
Constructor Details
-
ElasticsearchSearchProjectionBuilderFactory
public ElasticsearchSearchProjectionBuilderFactory(SearchProjectionBackendContext searchProjectionBackendContext, ElasticsearchSearchIndexScope<?> scope)
-
-
Method Details
-
documentReference
- Specified by:
documentReferencein interfaceSearchProjectionBuilderFactory
-
entityLoading
- Specified by:
entityLoadingin interfaceSearchProjectionBuilderFactory
-
entityReference
- Specified by:
entityReferencein interfaceSearchProjectionBuilderFactory
-
id
- Specified by:
idin interfaceSearchProjectionBuilderFactory
-
score
- Specified by:
scorein interfaceSearchProjectionBuilderFactory
-
composite
- Specified by:
compositein interfaceSearchProjectionBuilderFactory
-
constant
- Specified by:
constantin interfaceSearchProjectionBuilderFactory
-
entityComposite
- Specified by:
entityCompositein interfaceSearchProjectionBuilderFactory
-
throwing
- Specified by:
throwingin interfaceSearchProjectionBuilderFactory- 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
public <T> SearchProjection<T> byTypeName(Map<String, ? extends SearchProjection<? extends T>> inners) - Specified by:
byTypeNamein interfaceSearchProjectionBuilderFactory- 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
public <T> SearchProjection<T> withParameters(Function<? super NamedValues, ? extends ProjectionFinalStep<T>> projectionCreator) - Specified by:
withParametersin interfaceSearchProjectionBuilderFactory
-
source
-
explanation
-
jsonHit
-