Modifier and Type | Field and Description |
---|---|
protected List<String> |
fields |
protected HighlightQuery |
highlightQuery |
protected Collection<String> |
ids |
protected org.elasticsearch.action.support.IndicesOptions |
indicesOptions |
protected Integer |
maxResults |
protected float |
minScore |
protected Pageable |
pageable |
protected String |
preference |
protected String |
route |
protected org.elasticsearch.action.search.SearchType |
searchType |
protected Sort |
sort |
protected SourceFilter |
sourceFilter |
protected boolean |
trackScores |
DEFAULT_PAGE, DEFAULT_PAGE_SIZE
Constructor and Description |
---|
StringQuery(String source) |
StringQuery(String source,
Pageable pageable) |
StringQuery(String source,
Pageable pageable,
Sort sort) |
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
|
List<String> |
getFields()
Get fields to be returned as part of search request
|
Optional<HighlightQuery> |
getHighlightQuery() |
Collection<String> |
getIds()
Get Ids
|
org.elasticsearch.action.support.IndicesOptions |
getIndicesOptions()
Get indices options
|
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() |
String |
getSource() |
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>
|
boolean |
isLimiting() |
void |
setHighlightQuery(HighlightQuery highlightQuery)
Sets the
HighlightQuery |
void |
setIds(Collection<String> ids) |
void |
setIndicesOptions(org.elasticsearch.action.support.IndicesOptions indicesOptions) |
void |
setMaxResults(Integer maxResults) |
void |
setMinScore(float minScore) |
<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 |
setRoute(String route) |
void |
setSearchType(org.elasticsearch.action.search.SearchType searchType) |
void |
setTrackScores(boolean trackScores)
Configures whether to track scores.
|
void |
setTrackTotalHits(boolean trackTotalHits)
Sets the flag whether to set the Track_total_hits parameter on queries Elasticseacrh
documentation>
|
protected Pageable pageable
protected Sort sort
protected SourceFilter sourceFilter
protected float minScore
protected Collection<String> ids
protected String route
protected org.elasticsearch.action.search.SearchType searchType
protected org.elasticsearch.action.support.IndicesOptions indicesOptions
protected boolean trackScores
protected String preference
protected Integer maxResults
protected HighlightQuery highlightQuery
public StringQuery(String source)
public String getSource()
public Pageable getPageable()
Query
getPageable
in interface Query
public final <T extends Query> T setPageable(Pageable pageable)
Query
setPageable
in interface Query
public void addFields(String... fields)
Query
public List<String> getFields()
Query
public void addSourceFilter(SourceFilter sourceFilter)
Query
addSourceFilter
in interface Query
public SourceFilter getSourceFilter()
Query
getSourceFilter
in interface Query
public final <T extends Query> T addSort(Sort sort)
Query
Sort
to querypublic float getMinScore()
Query
getMinScore
in interface Query
public void setMinScore(float minScore)
public Collection<String> getIds()
Query
public void setIds(Collection<String> ids)
public void setRoute(String route)
public void setSearchType(org.elasticsearch.action.search.SearchType searchType)
public org.elasticsearch.action.search.SearchType getSearchType()
Query
getSearchType
in interface Query
public org.elasticsearch.action.support.IndicesOptions getIndicesOptions()
Query
getIndicesOptions
in interface Query
public void setIndicesOptions(org.elasticsearch.action.support.IndicesOptions indicesOptions)
public boolean getTrackScores()
Query
getTrackScores
in interface Query
public void setTrackScores(boolean trackScores)
trackScores
- public String getPreference()
Query
getPreference
in interface Query
public void setPreference(String preference)
Query
setPreference
in interface Query
public boolean isLimiting()
isLimiting
in interface Query
public Integer getMaxResults()
Query
Query.isLimiting()
returns true.getMaxResults
in interface Query
public void setMaxResults(Integer maxResults)
public void setHighlightQuery(HighlightQuery highlightQuery)
Query
HighlightQuery
.*setHighlightQuery
in interface Query
highlightQuery
- the query to setpublic Optional<HighlightQuery> getHighlightQuery()
getHighlightQuery
in interface Query
HighlightQuery
.public void setTrackTotalHits(boolean trackTotalHits)
Query
setTrackTotalHits
in interface Query
trackTotalHits
- the value to set.public boolean getTrackTotalHits()
Query
getTrackTotalHits
in interface Query
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.