public abstract class QuerySpec extends Object
| Constructor and Description |
|---|
QuerySpec() |
| Modifier and Type | Method and Description |
|---|---|
QuerySpec |
exclude(String exclude) |
QuerySpec |
excludeResults()
Convenience method to exclude search hitList from the results.
|
QuerySpec |
include(String include) |
QuerySpec |
includeAllSources()
Convenience method to include the complete query output in the results.
|
QuerySpec |
setAggregate(String aggregate)
Convenience method that sets the current aggregate
|
QuerySpec |
setAggregateSize(int aggregateSize)
Convenience method that sets the aggregate size
|
QuerySpec |
setCountOnly(boolean countOnly)
Convenience method that sets a flag to include only result count
|
QuerySpec |
setExplain(boolean explain)
Sets whether ES explain info is included in the results.
|
QuerySpec |
setHighlight(QueryHighlight highlight) |
QuerySpec |
setIndex(String... indexName)
Sets the indices against which the query is executed.
|
QuerySpec |
setInnerHits(InnerHits innerHits) |
QuerySpec |
setPageSize(int pageSize)
Sets the number of search results returned.
|
QuerySpec |
setQuerySort(QuerySort querySort)
Convenience method to include a query sort object
|
QuerySpec |
setScroll(Integer scroll)
Convenience method that sets the current scroll
|
QuerySpec |
setStartRecord(int startRecord)
Sets the first record from which search results are paginated.
|
QuerySpec |
setType(String... typeName)
Sets the document types against which the query is executed.
|
protected QuerySort querySort
public QuerySpec setIndex(String... indexName)
indexName - The names of the indices to add.QuerySpec objectpublic QuerySpec setType(String... typeName)
typeName - The names of the document types to search.QuerySpec objectpublic QuerySpec setStartRecord(int startRecord)
startRecord - The number of record to start from.QuerySpec objectpublic QuerySpec setPageSize(int pageSize)
pageSize - The number of results to return.QuerySpec objectpublic QuerySpec setExplain(boolean explain)
explain - Whether to enable or disable the ES explain info.QuerySpec objectpublic QuerySpec includeAllSources()
QuerySpec objectpublic QuerySpec excludeResults()
QuerySpec objectpublic QuerySpec setQuerySort(QuerySort querySort)
querySort - the query sort objectQuerySpec objectpublic QuerySpec setCountOnly(boolean countOnly)
countOnly - the flagQuerySpec objectpublic QuerySpec setScroll(Integer scroll)
scroll - the scrollQuerySpec objectpublic QuerySpec setAggregate(String aggregate)
aggregate - the aggregateQuerySpec objectpublic QuerySpec setAggregateSize(int aggregateSize)
aggregateSize - the aggregate sizeQuerySpec objectpublic QuerySpec setHighlight(QueryHighlight highlight)
Copyright © 2020. All rights reserved.