Class NativeQueryBuilder
java.lang.Object
org.springframework.data.elasticsearch.core.query.BaseQueryBuilder<NativeQuery, NativeQueryBuilder>
org.springframework.data.elasticsearch.client.elc.NativeQueryBuilder
- Since:
- 4.4
- Author:
- Peter-Josef Meisch, Sascha Woo, Haibo Liu
-
Field Summary
Fields inherited from class BaseQueryBuilder
rescorerQueries -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()@Nullable co.elastic.clients.elasticsearch.core.search.FieldCollapse@Nullable co.elastic.clients.elasticsearch._types.query_dsl.Query@Nullable co.elastic.clients.elasticsearch._types.KnnQuery@Nullable List<co.elastic.clients.elasticsearch._types.KnnSearch> @Nullable co.elastic.clients.elasticsearch._types.query_dsl.QuerygetQuery()List<co.elastic.clients.elasticsearch._types.SortOptions> @Nullable Query@Nullable co.elastic.clients.elasticsearch.core.search.SuggesterwithAggregation(String name, co.elastic.clients.elasticsearch._types.aggregations.Aggregation aggregation) withFieldCollapse(@Nullable co.elastic.clients.elasticsearch.core.search.FieldCollapse fieldCollapse) withFilter(@Nullable co.elastic.clients.elasticsearch._types.query_dsl.Query filter) withFilter(Function<co.elastic.clients.elasticsearch._types.query_dsl.Query.Builder, co.elastic.clients.util.ObjectBuilder<co.elastic.clients.elasticsearch._types.query_dsl.Query>> fn) withKnnSearches(co.elastic.clients.elasticsearch._types.KnnSearch knnSearch) withKnnSearches(Function<co.elastic.clients.elasticsearch._types.KnnSearch.Builder, co.elastic.clients.util.ObjectBuilder<co.elastic.clients.elasticsearch._types.KnnSearch>> fn) withKnnSearches(List<co.elastic.clients.elasticsearch._types.KnnSearch> knnSearches) withQuery(co.elastic.clients.elasticsearch._types.query_dsl.Query query) withQuery(Function<co.elastic.clients.elasticsearch._types.query_dsl.Query.Builder, co.elastic.clients.util.ObjectBuilder<co.elastic.clients.elasticsearch._types.query_dsl.Query>> fn) Allows to use aQuerywithin a NativeQuery.withSearchExtension(String key, co.elastic.clients.json.JsonData value) withSearchExtensions(Map<String, co.elastic.clients.json.JsonData> searchExtensions) withSort(co.elastic.clients.elasticsearch._types.SortOptions value, co.elastic.clients.elasticsearch._types.SortOptions... values) withSort(Function<co.elastic.clients.elasticsearch._types.SortOptions.Builder, co.elastic.clients.util.ObjectBuilder<co.elastic.clients.elasticsearch._types.SortOptions>> fn) withSuggester(@Nullable co.elastic.clients.elasticsearch.core.search.Suggester suggester) Methods inherited from class 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
-
Constructor Details
-
NativeQueryBuilder
public NativeQueryBuilder()
-
-
Method Details
-
getQuery
public @Nullable co.elastic.clients.elasticsearch._types.query_dsl.Query getQuery() -
getFilter
public @Nullable co.elastic.clients.elasticsearch._types.query_dsl.Query getFilter() -
getAggregations
-
getSuggester
public @Nullable co.elastic.clients.elasticsearch.core.search.Suggester getSuggester() -
getFieldCollapse
public @Nullable co.elastic.clients.elasticsearch.core.search.FieldCollapse getFieldCollapse() -
getSortOptions
-
getSearchExtensions
-
getKnnQuery
public @Nullable co.elastic.clients.elasticsearch._types.KnnQuery getKnnQuery() -
getKnnSearches
- Since:
- 5.3.1
-
getSpringDataQuery
-
withQuery
-
withQuery
public NativeQueryBuilder withQuery(Function<co.elastic.clients.elasticsearch._types.query_dsl.Query.Builder, co.elastic.clients.util.ObjectBuilder<co.elastic.clients.elasticsearch._types.query_dsl.Query>> fn) -
withFilter
public NativeQueryBuilder withFilter(@Nullable co.elastic.clients.elasticsearch._types.query_dsl.Query filter) -
withFilter
public NativeQueryBuilder withFilter(Function<co.elastic.clients.elasticsearch._types.query_dsl.Query.Builder, co.elastic.clients.util.ObjectBuilder<co.elastic.clients.elasticsearch._types.query_dsl.Query>> fn) -
withAggregation
public NativeQueryBuilder withAggregation(String name, co.elastic.clients.elasticsearch._types.aggregations.Aggregation aggregation) -
withSuggester
public NativeQueryBuilder withSuggester(@Nullable co.elastic.clients.elasticsearch.core.search.Suggester suggester) -
withFieldCollapse
public NativeQueryBuilder withFieldCollapse(@Nullable co.elastic.clients.elasticsearch.core.search.FieldCollapse fieldCollapse) -
withSort
public NativeQueryBuilder withSort(List<co.elastic.clients.elasticsearch._types.SortOptions> values) -
withSort
public NativeQueryBuilder withSort(co.elastic.clients.elasticsearch._types.SortOptions value, co.elastic.clients.elasticsearch._types.SortOptions... values) -
withSort
public NativeQueryBuilder withSort(Function<co.elastic.clients.elasticsearch._types.SortOptions.Builder, co.elastic.clients.util.ObjectBuilder<co.elastic.clients.elasticsearch._types.SortOptions>> fn) -
withSearchExtension
-
withSearchExtensions
public NativeQueryBuilder withSearchExtensions(Map<String, co.elastic.clients.json.JsonData> searchExtensions) -
withQuery
Allows to use aQuerywithin a NativeQuery. Cannot be used together withwithQuery(Query)that sets an Elasticsearch query. Passing in aNativeQuerywill result in an exception whenbuild()is called.- Since:
- 5.1
-
withKnnSearches
public NativeQueryBuilder withKnnSearches(List<co.elastic.clients.elasticsearch._types.KnnSearch> knnSearches) - Since:
- 5.4
-
withKnnSearches
public NativeQueryBuilder withKnnSearches(Function<co.elastic.clients.elasticsearch._types.KnnSearch.Builder, co.elastic.clients.util.ObjectBuilder<co.elastic.clients.elasticsearch._types.KnnSearch>> fn) - Since:
- 5.4
-
withKnnSearches
public NativeQueryBuilder withKnnSearches(co.elastic.clients.elasticsearch._types.KnnSearch knnSearch) - Since:
- 5.4
-
build
- Specified by:
buildin classBaseQueryBuilder<NativeQuery, NativeQueryBuilder>
-