Package org.opensearch.data.client.orhlc
Class HighlightQueryBuilder
java.lang.Object
org.opensearch.data.client.orhlc.HighlightQueryBuilder
Converts the
Highlight annotation from a method to an OpenSearch HighlightBuilder.- Since:
- 0.1
-
Constructor Summary
ConstructorsConstructorDescriptionHighlightQueryBuilder(org.springframework.data.mapping.context.MappingContext<? extends org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity<?>, org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty> mappingContext) -
Method Summary
Modifier and TypeMethodDescriptionorg.opensearch.search.fetch.subphase.highlight.HighlightBuildergetHighlightBuilder(org.springframework.data.elasticsearch.core.query.highlight.Highlight highlight, Class<?> type) creates an OpenSearch HighlightBuilder from an annotation.
-
Constructor Details
-
HighlightQueryBuilder
public HighlightQueryBuilder(org.springframework.data.mapping.context.MappingContext<? extends org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity<?>, org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty> mappingContext)
-
-
Method Details
-
getHighlightBuilder
public org.opensearch.search.fetch.subphase.highlight.HighlightBuilder getHighlightBuilder(org.springframework.data.elasticsearch.core.query.highlight.Highlight highlight, @Nullable Class<?> type) creates an OpenSearch HighlightBuilder from an annotation.- Parameters:
highlight- , must not be nulltype- the entity type, used to map field names. If null, field names are not mapped.- Returns:
- the builder for the highlight
-