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
,NativeSearchQueryBuilder
,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
FieldsModifier and TypeFieldDescriptionprotected HighlightQuery
protected final List<Query.IdWithRouting>
protected IndicesOptions
protected Query.PointInTime
protected Boolean
protected final List<RescorerQuery>
protected final List<RuntimeField>
protected Duration
protected Query.SearchType
protected Duration
protected Integer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Q
build()
boolean
getIds()
float
getRoute()
getSort()
boolean
withExplain
(boolean explain) withFields
(String... fields) withFields
(Collection<String> fields) withHighlightQuery
(HighlightQuery highlightQuery) withIds
(Collection<String> ids) withIdsWithRouting
(List<Query.IdWithRouting> idsWithRouting) withIndicesBoost
(List<IndexBoost> indicesBoost) withIndicesBoost
(IndexBoost... indicesBoost) withIndicesOptions
(IndicesOptions indicesOptions) withMaxResults
(Integer maxResults) withMinScore
(float minScore) withPageable
(Pageable pageable) withPointInTime
(Query.PointInTime pointInTime) withPreference
(String preference) withRequestCache
(Boolean requestCache) withRescorerQueries
(List<RescorerQuery> rescorerQueries) withRescorerQuery
(RescorerQuery rescorerQuery) withRuntimeFields
(List<RuntimeField> runtimeFields) withScrollTime
(Duration scrollTime) withSearchAfter
(List<Object> searchAfter) withSearchType
(Query.SearchType searchType) withSourceFilter
(SourceFilter sourceFilter) withStoredFields
(List<String> storedFields) withTimeout
(Duration timeout) withTrackScores
(boolean trackScores) withTrackTotalHits
(Boolean trackTotalHits) withTrackTotalHitsUpTo
(Integer trackTotalHitsUpTo)
-
Field Details
-
searchType
-
indicesOptions
-
highlightQuery
-
trackTotalHitsUpTo
-
scrollTime
-
timeout
-
searchAfter
-
rescorerQueries
-
requestCache
-
idsWithRouting
-
runtimeFields
-
pointInTime
-
-
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
-
withPageable
-
withSort
-
withMaxResults
-
withIds
-
withIds
-
withTrackScores
-
withIndicesOptions
-
withMinScore
-
withPreference
-
withSourceFilter
-
withFields
-
withFields
-
withHighlightQuery
-
withRoute
-
withIndicesBoost
-
withStoredFields
-
withIndicesBoost
-
withSearchType
-
withTrackTotalHits
-
withTrackTotalHitsUpTo
-
withTimeout
-
withScrollTime
-
withExplain
-
withSearchAfter
-
withRequestCache
-
withIdsWithRouting
-
withRuntimeFields
-
withRescorerQueries
-
withRescorerQuery
-
withPointInTime
- Since:
- 5.0
-
build
-