Class NativeQueryBuilder

java.lang.Object
org.springframework.data.elasticsearch.core.query.BaseQueryBuilder<NativeQuery,NativeQueryBuilder>
org.opensearch.data.client.osc.NativeQueryBuilder

public class NativeQueryBuilder extends org.springframework.data.elasticsearch.core.query.BaseQueryBuilder<NativeQuery,NativeQueryBuilder>
Since:
4.4
  • Field Summary

    Fields inherited from class org.springframework.data.elasticsearch.core.query.BaseQueryBuilder

    rescorerQueries
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Map<String,org.opensearch.client.opensearch._types.aggregations.Aggregation>
     
    org.opensearch.client.opensearch.core.search.FieldCollapse
     
    org.opensearch.client.opensearch._types.query_dsl.Query
     
    org.opensearch.client.opensearch._types.query_dsl.KnnQuery
     
    org.opensearch.client.opensearch._types.query_dsl.Query
     
    Map<String,org.opensearch.client.json.JsonData>
     
    List<org.opensearch.client.opensearch._types.SortOptions>
     
    org.springframework.data.elasticsearch.core.query.Query
     
    org.opensearch.client.opensearch.core.search.Suggester
     
    withAggregation(String name, org.opensearch.client.opensearch._types.aggregations.Aggregation aggregation)
     
    withFieldCollapse(org.opensearch.client.opensearch.core.search.FieldCollapse fieldCollapse)
     
    withFilter(Function<org.opensearch.client.opensearch._types.query_dsl.Query.Builder,org.opensearch.client.util.ObjectBuilder<org.opensearch.client.opensearch._types.query_dsl.Query>> fn)
     
    withFilter(org.opensearch.client.opensearch._types.query_dsl.Query filter)
     
    withKnnQuery(org.opensearch.client.opensearch._types.query_dsl.KnnQuery knnQuery)
     
    withQuery(Function<org.opensearch.client.opensearch._types.query_dsl.Query.Builder,org.opensearch.client.util.ObjectBuilder<org.opensearch.client.opensearch._types.query_dsl.Query>> fn)
     
    withQuery(org.opensearch.client.opensearch._types.query_dsl.Query query)
     
    withQuery(org.opensearch.client.opensearch._types.query_dsl.QueryVariant variant)
     
    withQuery(org.opensearch.client.util.ObjectBuilder<? extends org.opensearch.client.opensearch._types.query_dsl.QueryVariant> builder)
     
    withQuery(org.springframework.data.elasticsearch.core.query.Query query)
    Allows to use a Query within a NativeQuery.
    withSearchExtension(String key, org.opensearch.client.json.JsonData value)
     
    withSearchExtensions(Map<String,org.opensearch.client.json.JsonData> searchExtensions)
     
    withSort(Function<org.opensearch.client.opensearch._types.SortOptions.Builder,org.opensearch.client.util.ObjectBuilder<org.opensearch.client.opensearch._types.SortOptions>> fn)
     
    withSort(List<org.opensearch.client.opensearch._types.SortOptions> values)
     
    withSort(org.opensearch.client.opensearch._types.SortOptions value, org.opensearch.client.opensearch._types.SortOptions... values)
     
    withSuggester(org.opensearch.client.opensearch.core.search.Suggester suggester)
     

    Methods inherited from class org.springframework.data.elasticsearch.core.query.BaseQueryBuilder

    getAllowNoIndices, getDocValueFields, getExpandWildcards, getExplain, getFields, getHighlightQuery, getIds, getIdsWithRouting, getIndicesBoost, getIndicesOptions, getMaxResults, getMinScore, getPageable, getPointInTime, getPreference, getReactiveBatchSize, getRequestCache, getRescorerQueries, getRoute, getRuntimeFields, getScriptedFields, getScrollTime, getSearchAfter, getSearchType, getSort, getSourceFilter, getStoredFields, getTimeout, getTrackScores, getTrackTotalHits, getTrackTotalHitsUpTo, withAllowNoIndices, withDocValueFields, withExpandWildcards, withExplain, withFields, withFields, withHighlightQuery, withIds, withIds, withIdsWithRouting, withIndicesBoost, withIndicesBoost, withIndicesOptions, withMaxResults, withMinScore, withPageable, withPointInTime, withPreference, withReactiveBatchSize, withRequestCache, withRescorerQueries, withRescorerQuery, withRoute, withRuntimeFields, withScriptedField, withScrollTime, withSearchAfter, withSearchType, withSort, withSourceFilter, withStoredFields, withTimeout, withTrackScores, withTrackTotalHits, withTrackTotalHitsUpTo

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NativeQueryBuilder

      public NativeQueryBuilder()
  • Method Details

    • getQuery

      @Nullable public org.opensearch.client.opensearch._types.query_dsl.Query getQuery()
    • getFilter

      @Nullable public org.opensearch.client.opensearch._types.query_dsl.Query getFilter()
    • getAggregations

      public Map<String,org.opensearch.client.opensearch._types.aggregations.Aggregation> getAggregations()
    • getSuggester

      @Nullable public org.opensearch.client.opensearch.core.search.Suggester getSuggester()
    • getFieldCollapse

      @Nullable public org.opensearch.client.opensearch.core.search.FieldCollapse getFieldCollapse()
    • getSortOptions

      public List<org.opensearch.client.opensearch._types.SortOptions> getSortOptions()
    • getSearchExtensions

      public Map<String,org.opensearch.client.json.JsonData> getSearchExtensions()
    • getKnnQuery

      @Nullable public org.opensearch.client.opensearch._types.query_dsl.KnnQuery getKnnQuery()
    • getSpringDataQuery

      @Nullable public org.springframework.data.elasticsearch.core.query.Query getSpringDataQuery()
    • withQuery

      public NativeQueryBuilder withQuery(org.opensearch.client.opensearch._types.query_dsl.QueryVariant variant)
    • withQuery

      public NativeQueryBuilder withQuery(org.opensearch.client.util.ObjectBuilder<? extends org.opensearch.client.opensearch._types.query_dsl.QueryVariant> builder)
    • withQuery

      public NativeQueryBuilder withQuery(org.opensearch.client.opensearch._types.query_dsl.Query query)
    • withQuery

      public NativeQueryBuilder withQuery(Function<org.opensearch.client.opensearch._types.query_dsl.Query.Builder,org.opensearch.client.util.ObjectBuilder<org.opensearch.client.opensearch._types.query_dsl.Query>> fn)
    • withFilter

      public NativeQueryBuilder withFilter(@Nullable org.opensearch.client.opensearch._types.query_dsl.Query filter)
    • withFilter

      public NativeQueryBuilder withFilter(Function<org.opensearch.client.opensearch._types.query_dsl.Query.Builder,org.opensearch.client.util.ObjectBuilder<org.opensearch.client.opensearch._types.query_dsl.Query>> fn)
    • withAggregation

      public NativeQueryBuilder withAggregation(String name, org.opensearch.client.opensearch._types.aggregations.Aggregation aggregation)
    • withSuggester

      public NativeQueryBuilder withSuggester(@Nullable org.opensearch.client.opensearch.core.search.Suggester suggester)
    • withFieldCollapse

      public NativeQueryBuilder withFieldCollapse(@Nullable org.opensearch.client.opensearch.core.search.FieldCollapse fieldCollapse)
    • withSort

      public NativeQueryBuilder withSort(List<org.opensearch.client.opensearch._types.SortOptions> values)
    • withSort

      public NativeQueryBuilder withSort(org.opensearch.client.opensearch._types.SortOptions value, org.opensearch.client.opensearch._types.SortOptions... values)
    • withSort

      public NativeQueryBuilder withSort(Function<org.opensearch.client.opensearch._types.SortOptions.Builder,org.opensearch.client.util.ObjectBuilder<org.opensearch.client.opensearch._types.SortOptions>> fn)
    • withSearchExtension

      public NativeQueryBuilder withSearchExtension(String key, org.opensearch.client.json.JsonData value)
    • withSearchExtensions

      public NativeQueryBuilder withSearchExtensions(Map<String,org.opensearch.client.json.JsonData> searchExtensions)
    • withQuery

      public NativeQueryBuilder withQuery(org.springframework.data.elasticsearch.core.query.Query query)
      Allows to use a Query within a NativeQuery. Cannot be used together with withQuery(Query) that sets an Elasticsearch query. Passing in a NativeQuery will result in an exception when build() is called.
      Since:
      5.1
    • withKnnQuery

      public NativeQueryBuilder withKnnQuery(org.opensearch.client.opensearch._types.query_dsl.KnnQuery knnQuery)
      Since:
      5.1
    • build

      public NativeQuery build()
      Specified by:
      build in class org.springframework.data.elasticsearch.core.query.BaseQueryBuilder<NativeQuery,NativeQueryBuilder>