Class HighlightQueryBuilder

java.lang.Object
org.opensearch.data.client.orhlc.HighlightQueryBuilder

public class HighlightQueryBuilder extends Object
Converts the Highlight annotation from a method to an OpenSearch HighlightBuilder.
Since:
0.1
  • Constructor Summary

    Constructors
    Constructor
    Description
    HighlightQueryBuilder(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 Type
    Method
    Description
    org.opensearch.search.fetch.subphase.highlight.HighlightBuilder
    getHighlightBuilder(org.springframework.data.elasticsearch.core.query.highlight.Highlight highlight, Class<?> type)
    creates an OpenSearch HighlightBuilder from an annotation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 null
      type - the entity type, used to map field names. If null, field names are not mapped.
      Returns:
      the builder for the highlight