Class LuceneIdProjection<I>
- java.lang.Object
-
- org.hibernate.search.backend.lucene.search.projection.impl.LuceneIdProjection<I>
-
- All Implemented Interfaces:
LuceneSearchProjection<I>,LuceneSearchProjection.Extractor<String,I>,SearchProjection<I>
public class LuceneIdProjection<I> extends Object implements LuceneSearchProjection.Extractor<String,I>
-
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>indexNames()LuceneSearchProjection.Extractor<?,I>request(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.StringtoString()Itransform(LoadingResult<?> loadingResult, String extractedData, ProjectionTransformContext context)Transforms the extracted data to the actual projection result.Values<String>values(ProjectionExtractContext context)Creates low-level values for use in aTopDocsDataCollector.
-
-
-
Method Detail
-
request
public LuceneSearchProjection.Extractor<?,I> request(ProjectionRequestContext context)
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<I>- Parameters:
context- An execution context for the request.- Returns:
- An
LuceneSearchProjection.Extractor, to extract the result of the projection from the Elasticsearch response.
-
values
public Values<String> values(ProjectionExtractContext context)
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<String,I>- Parameters:
context- An execution context for the extraction.- Returns:
- The
Valuesto use during Lucene collection of top docs data.
-
transform
public I transform(LoadingResult<?> loadingResult, String extractedData, ProjectionTransformContext context)
Description copied from interface:LuceneSearchProjection.ExtractorTransforms the extracted data to the actual projection result.- Specified by:
transformin interfaceLuceneSearchProjection.Extractor<String,I>- 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
public final Set<String> indexNames()
- Specified by:
indexNamesin interfaceLuceneSearchProjection<P>
-
-