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
-
Field Summary
Fields inherited from class org.springframework.data.elasticsearch.core.query.BaseQueryBuilder
rescorerQueries
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
co.elastic.clients.elasticsearch.core.search.FieldCollapse
co.elastic.clients.elasticsearch._types.query_dsl.Query
co.elastic.clients.elasticsearch._types.KnnQuery
co.elastic.clients.elasticsearch._types.query_dsl.Query
getQuery()
List<co.elastic.clients.elasticsearch._types.SortOptions>
co.elastic.clients.elasticsearch.core.search.Suggester
withAggregation
(String name, co.elastic.clients.elasticsearch._types.aggregations.Aggregation aggregation) withFieldCollapse
(co.elastic.clients.elasticsearch.core.search.FieldCollapse fieldCollapse) withFilter
(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) withKnnQuery
(co.elastic.clients.elasticsearch._types.KnnQuery knnQuery) 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 aQuery
within 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
(co.elastic.clients.elasticsearch.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
-
Constructor Details
-
NativeQueryBuilder
public NativeQueryBuilder()
-
-
Method Details
-
getQuery
-
getFilter
-
getAggregations
-
getSuggester
-
getFieldCollapse
-
getSortOptions
-
getSearchExtensions
-
getKnnQuery
-
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 aQuery
within a NativeQuery. Cannot be used together withwithQuery(Query)
that sets an Elasticsearch query. Passing in aNativeQuery
will result in an exception whenbuild()
is called.- Since:
- 5.1
-
withKnnQuery
- Since:
- 5.1
-
build
- Specified by:
build
in classBaseQueryBuilder<NativeQuery,
NativeQueryBuilder>
-