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
|
void |
addIndices(String... indices)
Add Indices 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
|
void |
addTypes(String... types)
Add types to be searched
|
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
|
Collection<String> |
getIds()
Get Ids
|
List<String> |
getIndices()
Get Indices to be searched
|
org.elasticsearch.action.support.IndicesOptions |
getIndicesOptions()
Get indices options
|
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.
|
List<String> |
getTypes()
Get types to be searched
|
<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
|
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()
Sort getSort()
void addIndices(String... indices)
indices
- void addTypes(String... types)
types
- void addFields(String... fields)
fields
- void addSourceFilter(SourceFilter sourceFilter)
sourceFilter
- SourceFilter getSourceFilter()
float getMinScore()
boolean getTrackScores()
Collection<String> getIds()
String getRoute()
org.elasticsearch.action.search.SearchType getSearchType()
org.elasticsearch.action.support.IndicesOptions getIndicesOptions()
String getPreference()
void setPreference(String preference)
preference
- Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.