Class LuceneEntityLoadingProjection<E>
java.lang.Object
org.hibernate.search.backend.lucene.search.projection.impl.LuceneEntityLoadingProjection<E>
- All Implemented Interfaces:
LuceneSearchProjection<E>,LuceneSearchProjection.Extractor<Object,,E> SearchProjection<E>
public class LuceneEntityLoadingProjection<E>
extends Object
implements LuceneSearchProjection.Extractor<Object,E>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.search.backend.lucene.search.projection.impl.LuceneSearchProjection
LuceneSearchProjection.Extractor<E,P> -
Field Summary
Fields inherited from interface org.hibernate.search.backend.lucene.search.projection.impl.LuceneSearchProjection
log -
Method Summary
Modifier and TypeMethodDescriptionrequest(ProjectionRequestContext context) Request the collection of per-document data that will be used inLuceneSearchProjection.Extractor.values(ProjectionExtractContext), making sure that the requirements for this projection are met.toString()transform(LoadingResult<?> loadingResult, Object extractedData, ProjectionTransformContext context) Transforms the extracted data to the actual projection result.values(ProjectionExtractContext context) Creates low-level values for use in aTopDocsDataCollector.
-
Method Details
-
toString
-
request
Description copied from interface:LuceneSearchProjectionRequest the collection of per-document data that will be used inLuceneSearchProjection.Extractor.values(ProjectionExtractContext), making sure that the requirements for this projection are met.- Specified by:
requestin interfaceLuceneSearchProjection<E>- Parameters:
context- An execution context for the request.- Returns:
- An
LuceneSearchProjection.Extractor, to extract the result of the projection from the Elasticsearch response.
-
values
Description copied from interface:LuceneSearchProjection.ExtractorCreates low-level values for use in aTopDocsDataCollector.The returned
Valuesshould only perform operations relative to extracting content from the index, delaying operations that rely on the mapper untilLuceneSearchProjection.Extractor.transform(LoadingResult, Object, ProjectionTransformContext)is called, so that blocking mapper operations (if any) do not pollute backend threads.- Specified by:
valuesin interfaceLuceneSearchProjection.Extractor<Object,E> - Parameters:
context- An execution context for the extraction.- Returns:
- The
Valuesto use during Lucene collection of top docs data.
-
transform
public E transform(LoadingResult<?> loadingResult, Object extractedData, ProjectionTransformContext context) Description copied from interface:LuceneSearchProjection.ExtractorTransforms the extracted data to the actual projection result.- Specified by:
transformin interfaceLuceneSearchProjection.Extractor<Object,E> - Parameters:
loadingResult- Container containing all the entities that have been loaded by theProjectionHitMapper.extractedData- The extracted data to transform, returned by thevalue source.context- An execution context for the transforming.- Returns:
- The final result considered as a hit.
-
indexNames
- Specified by:
indexNamesin interfaceLuceneSearchProjection<P>
-