Class LuceneSearchProjectionBuilderFactory
- java.lang.Object
-
- org.hibernate.search.backend.lucene.search.projection.impl.LuceneSearchProjectionBuilderFactory
-
- All Implemented Interfaces:
SearchProjectionBuilderFactory
public class LuceneSearchProjectionBuilderFactory extends Object implements SearchProjectionBuilderFactory
-
-
Constructor Summary
Constructors Constructor Description LuceneSearchProjectionBuilderFactory(LuceneSearchIndexScope<?> scope)
-
Method Summary
All Methods Instance Methods Concrete 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<org.apache.lucene.document.Document>document()SearchProjection<DocumentReference>documentReference()<T> SearchProjection<T>entityComposite(SearchProjection<T> delegate)<E> SearchProjection<E>entityLoading()<R> SearchProjection<R>entityReference()SearchProjection<org.apache.lucene.search.Explanation>explanation()<I> SearchProjection<I>id(Class<I> requestedIdentifierType)SearchProjection<Float>score()<T> SearchProjection<T>throwing(Supplier<SearchException> exceptionSupplier)
-
-
-
Constructor Detail
-
LuceneSearchProjectionBuilderFactory
public LuceneSearchProjectionBuilderFactory(LuceneSearchIndexScope<?> scope)
-
-
Method Detail
-
documentReference
public SearchProjection<DocumentReference> documentReference()
- Specified by:
documentReferencein interfaceSearchProjectionBuilderFactory
-
entityLoading
public <E> SearchProjection<E> entityLoading()
- Specified by:
entityLoadingin interfaceSearchProjectionBuilderFactory
-
entityReference
public <R> SearchProjection<R> entityReference()
- Specified by:
entityReferencein interfaceSearchProjectionBuilderFactory
-
id
public <I> SearchProjection<I> id(Class<I> requestedIdentifierType)
- Specified by:
idin interfaceSearchProjectionBuilderFactory
-
score
public SearchProjection<Float> score()
- Specified by:
scorein interfaceSearchProjectionBuilderFactory
-
composite
public CompositeProjectionBuilder composite()
- Specified by:
compositein interfaceSearchProjectionBuilderFactory
-
constant
public <T> SearchProjection<T> constant(T value)
- Specified by:
constantin interfaceSearchProjectionBuilderFactory
-
entityComposite
public <T> SearchProjection<T> entityComposite(SearchProjection<T> delegate)
- Specified by:
entityCompositein interfaceSearchProjectionBuilderFactory
-
throwing
public <T> SearchProjection<T> throwing(Supplier<SearchException> exceptionSupplier)
- 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.
-
document
public SearchProjection<org.apache.lucene.document.Document> document()
-
explanation
public SearchProjection<org.apache.lucene.search.Explanation> explanation()
-
-