Class BaseQueryBuilder<Q extends BaseQuery, SELF extends BaseQueryBuilder<Q,SELF> >
java.lang.Object
org.springframework.data.elasticsearch.core.query.BaseQueryBuilder<Q,SELF>
- Direct Known Subclasses:
CriteriaQueryBuilder, NativeQueryBuilder, SearchTemplateQueryBuilder, StringQueryBuilder
public abstract class BaseQueryBuilder<Q extends BaseQuery, SELF extends BaseQueryBuilder<Q,SELF>>
extends Object
base class for query builders. The different implementations of
Query should derive from this class and then
offer a constructor that takes their builder as argument and passes this on to the super class.- Since:
- 4.4
- Author:
- Peter-Josef Meisch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Qbuild()@Nullable Booleanboolean@Nullable HighlightQuery@Nullable Collection<String> getIds()@Nullable List<IndexBoost> @Nullable IndicesOptions@Nullable Integerfloat@Nullable Pageable@Nullable Query.PointInTime@Nullable String@Nullable Integer@Nullable Boolean@Nullable StringgetRoute()@Nullable Duration@Nullable Query.SearchType@Nullable SortgetSort()@Nullable SourceFilter@Nullable Durationboolean@Nullable Boolean@Nullable IntegerwithAllowNoIndices(@Nullable Boolean allowNoIndices) withDocValueFields(List<DocValueField> docValueFields) withExpandWildcards(EnumSet<IndicesOptions.WildcardStates> expandWildcards) withExplain(boolean explain) withFields(String... fields) withFields(Collection<String> fields) withHighlightQuery(HighlightQuery highlightQuery) Set Ids for a multi-get request run with this query.withIds(Collection<String> ids) Set Ids for a multi-get request run with this query.withIdsWithRouting(List<Query.IdWithRouting> idsWithRouting) Set Ids with routing values for a multi-get request run with this query.withIndicesBoost(@Nullable List<IndexBoost> indicesBoost) withIndicesBoost(IndexBoost... indicesBoost) withIndicesOptions(IndicesOptions indicesOptions) withMaxResults(Integer maxResults) withMinScore(float minScore) withPageable(Pageable pageable) withPointInTime(@Nullable Query.PointInTime pointInTime) withPreference(String preference) withReactiveBatchSize(@Nullable Integer reactiveBatchSize) withRequestCache(@Nullable Boolean requestCache) withRescorerQueries(List<RescorerQuery> rescorerQueries) withRescorerQuery(RescorerQuery rescorerQuery) withRuntimeFields(List<RuntimeField> runtimeFields) withScriptedField(ScriptedField scriptedField) withScrollTime(@Nullable Duration scrollTime) withSearchAfter(@Nullable List<Object> searchAfter) withSearchType(@Nullable Query.SearchType searchType) withSourceFilter(SourceFilter sourceFilter) withStoredFields(@Nullable List<String> storedFields) withTimeout(@Nullable Duration timeout) withTrackScores(boolean trackScores) withTrackTotalHits(@Nullable Boolean trackTotalHits) withTrackTotalHitsUpTo(@Nullable Integer trackTotalHitsUpTo)
-
Field Details
-
rescorerQueries
-
-
Constructor Details
-
BaseQueryBuilder
public BaseQueryBuilder()
-
-
Method Details
-
getSort
-
getPageable
-
getFields
-
getStoredFields
-
getMaxResults
-
getIds
-
getTrackScores
public boolean getTrackScores() -
getIndicesOptions
-
getMinScore
public float getMinScore() -
getPreference
-
getSourceFilter
-
getHighlightQuery
-
getRoute
-
getIndicesBoost
-
getSearchType
-
getTrackTotalHits
-
getTrackTotalHitsUpTo
-
getScrollTime
-
getTimeout
-
getExplain
public boolean getExplain() -
getSearchAfter
-
getRequestCache
-
getIdsWithRouting
-
getRuntimeFields
-
getRescorerQueries
-
getPointInTime
- Since:
- 5.0
-
getReactiveBatchSize
- Since:
- 5.1
-
getAllowNoIndices
- Since:
- 5.1
-
getExpandWildcards
- Since:
- 5.1
-
getDocValueFields
- Since:
- 5.1
-
getScriptedFields
-
withPageable
-
withSort
-
withMaxResults
-
withIds
-
withIds
Set Ids for a multi-get request run with this query. Not used in any other searches.- Parameters:
ids- list of id values
-
withTrackScores
-
withIndicesOptions
-
withMinScore
-
withPreference
-
withSourceFilter
-
withFields
-
withFields
-
withHighlightQuery
-
withRoute
-
withIndicesBoost
-
withStoredFields
-
withIndicesBoost
-
withSearchType
-
withTrackTotalHits
-
withTrackTotalHitsUpTo
-
withTimeout
-
withScrollTime
-
withExplain
-
withSearchAfter
-
withRequestCache
-
withIdsWithRouting
Set Ids with routing values for a multi-get request run with this query. Not used in any other searches.- Parameters:
idsWithRouting- list of id values, must not be null- Since:
- 4.3
-
withRuntimeFields
-
withRescorerQueries
-
withRescorerQuery
-
withPointInTime
- Since:
- 5.0
-
withReactiveBatchSize
-
withAllowNoIndices
-
withExpandWildcards
-
withDocValueFields
- Since:
- 5.1
-
withScriptedField
-
build
-