Class HighlightProjectionOptionsStepImpl
java.lang.Object
org.hibernate.search.engine.search.projection.dsl.impl.HighlightProjectionOptionsStepImpl
- All Implemented Interfaces:
HighlightProjectionFinalStep,HighlightProjectionOptionsStep,ProjectionFinalStep<List<String>>
public class HighlightProjectionOptionsStepImpl
extends Object
implements HighlightProjectionOptionsStep, HighlightProjectionFinalStep
-
Constructor Summary
ConstructorsConstructorDescriptionHighlightProjectionOptionsStepImpl(SearchProjectionDslContext<?> dslContext, String fieldPath) -
Method Summary
Modifier and TypeMethodDescriptionhighlighter(String highlighterName) Defines a name of a named highlighter to be used by this field projection.single()Defines the projection as single-valued, i.e. returningStringinstead ofList<String>.Create aSearchProjectioninstance matching the definition given in the previous DSL steps.
-
Constructor Details
-
HighlightProjectionOptionsStepImpl
public HighlightProjectionOptionsStepImpl(SearchProjectionDslContext<?> dslContext, String fieldPath)
-
-
Method Details
-
highlighter
Description copied from interface:HighlightProjectionOptionsStepDefines a name of a named highlighter to be used by this field projection.- Specified by:
highlighterin interfaceHighlightProjectionOptionsStep- Parameters:
highlighterName- The name of a highlighterdefined on the query.- Returns:
- A final step to finish the definition of a highlight projection.
- See Also:
-
single
Description copied from interface:HighlightProjectionOptionsStepDefines the projection as single-valued, i.e. returningStringinstead ofList<String>.Can only be used when the highlighter that creates highlighted fragments for this projection is configured to return a single fragment at most, i.e. when
.numberOfFragments(1)is applied to the highlighter. Otherwise, it will lead to an exception being thrown when the query is created.- Specified by:
singlein interfaceHighlightProjectionOptionsStep- Returns:
- A final step in the highlight projection definition.
- See Also:
-
toProjection
Description copied from interface:ProjectionFinalStepCreate aSearchProjectioninstance matching the definition given in the previous DSL steps.- Specified by:
toProjectionin interfaceProjectionFinalStep<List<String>>- Returns:
- The
SearchProjectioninstance.
-