public interface Query
Modifier and Type | Field and Description |
---|---|
static Pageable |
DEFAULT_PAGE |
static int |
DEFAULT_PAGE_SIZE |
Modifier and Type | Method and Description |
---|---|
void |
addFields(String... fields)
Add fields to be added as part of search request
|
<T extends Query> |
addSort(Sort sort)
Add
Sort to query |
void |
addSourceFilter(SourceFilter sourceFilter)
Add source filter to be added as part of search request
|
static Query |
findAll()
Get get a
Query that matches all documents in the index. |
List<String> |
getFields()
Get fields to be returned as part of search request
|
default Optional<HighlightQuery> |
getHighlightQuery() |
Collection<String> |
getIds()
Get Ids
|
org.elasticsearch.action.support.IndicesOptions |
getIndicesOptions()
Get indices options
|
default Integer |
getMaxResults()
return the max of results.
|
float |
getMinScore()
Get minimum score
|
Pageable |
getPageable()
Get page settings if defined
|
String |
getPreference()
Get preference
|
String |
getRoute()
Get route
|
org.elasticsearch.action.search.SearchType |
getSearchType()
Type of search
|
Sort |
getSort() |
SourceFilter |
getSourceFilter()
Get SourceFilter to be returned to get include and exclude source fields as part of search request.
|
boolean |
getTrackScores()
Get if scores will be computed and tracked, regardless of whether sorting on a field.
|
boolean |
getTrackTotalHits()
Sets the flag whether to set the Track_total_hits parameter on queries Elasticseacrh
documentation>
|
default boolean |
isLimiting() |
void |
setHighlightQuery(HighlightQuery highlightQuery)
Sets the
HighlightQuery . |
<T extends Query> |
setPageable(Pageable pageable)
restrict result to entries on given page.
|
void |
setPreference(String preference)
Add preference filter to be added as part of search request
|
void |
setTrackTotalHits(boolean trackTotalHits)
Sets the flag whether to set the Track_total_hits parameter on queries Elasticseacrh
documentation>
|
static final int DEFAULT_PAGE_SIZE
static final Pageable DEFAULT_PAGE
static Query findAll()
Query
that matches all documents in the index.Query
.QueryBuilders.matchAllQuery()
<T extends Query> T setPageable(Pageable pageable)
pageable
- Pageable getPageable()
void addFields(String... fields)
fields
- void addSourceFilter(SourceFilter sourceFilter)
sourceFilter
- @Nullable SourceFilter getSourceFilter()
float getMinScore()
boolean getTrackScores()
@Nullable Collection<String> getIds()
org.elasticsearch.action.search.SearchType getSearchType()
@Nullable org.elasticsearch.action.support.IndicesOptions getIndicesOptions()
void setPreference(String preference)
preference
- default boolean isLimiting()
@Nullable default Integer getMaxResults()
isLimiting()
returns true.void setHighlightQuery(HighlightQuery highlightQuery)
HighlightQuery
.highlightQuery
- the query to setdefault Optional<HighlightQuery> getHighlightQuery()
HighlightQuery
.void setTrackTotalHits(boolean trackTotalHits)
trackTotalHits
- the value to set.boolean getTrackTotalHits()
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.