Class SearchRequest.Builder
- All Implemented Interfaces:
WithJson<SearchRequest.Builder>,ObjectBuilder<SearchRequest>
- Enclosing class:
- SearchRequest
SearchRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal SearchRequest.Builderaggregations(String key, Aggregation value) Defines the aggregations that are run as part of the search request.final SearchRequest.BuilderDefines the aggregations that are run as part of the search request.final SearchRequest.Builderaggregations(Map<String, Aggregation> map) Defines the aggregations that are run as part of the search request.final SearchRequest.BuilderallowNoIndices(Boolean value) Iffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indices.final SearchRequest.BuilderallowPartialSearchResults(Boolean value) If true, returns partial results if there are shard request timeouts or shard failures.final SearchRequest.BuilderAnalyzer to use for the query string.final SearchRequest.BuilderanalyzeWildcard(Boolean value) If true, wildcard and prefix queries are analyzed.final SearchRequest.BuilderbatchedReduceSize(Long value) The number of shard results that should be reduced at once on the coordinating node.build()Builds aSearchRequest.final SearchRequest.BuilderccsMinimizeRoundtrips(Boolean value) If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests.final SearchRequest.Buildercollapse(FieldCollapse value) Collapses search results the values of the specified field.final SearchRequest.BuilderCollapses search results the values of the specified field.final SearchRequest.BuilderdefaultOperator(Operator value) The default operator for query string query: AND or OR.final SearchRequest.BuilderField to use as default where no field prefix is given in the query string.final SearchRequest.BuilderdocvalueFields(FieldAndFormat value, FieldAndFormat... values) Array of wildcard (*) patterns.final SearchRequest.BuilderArray of wildcard (*) patterns.final SearchRequest.BuilderdocvalueFields(List<FieldAndFormat> list) Array of wildcard (*) patterns.final SearchRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values) Type of index that wildcard patterns can match.final SearchRequest.BuilderexpandWildcards(List<ExpandWildcard> list) Type of index that wildcard patterns can match.final SearchRequest.BuilderIf true, returns detailed information about score computation as part of a hit.final SearchRequest.BuilderConfiguration of search extensions defined by Elasticsearch plugins.final SearchRequest.BuilderConfiguration of search extensions defined by Elasticsearch plugins.final SearchRequest.Builderfields(FieldAndFormat value, FieldAndFormat... values) Array of wildcard (*) patterns.final SearchRequest.BuilderArray of wildcard (*) patterns.final SearchRequest.Builderfields(List<FieldAndFormat> list) Array of wildcard (*) patterns.final SearchRequest.BuilderStarting document offset.final SearchRequest.BuilderSpecifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.final SearchRequest.BuilderSpecifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.final SearchRequest.BuilderignoreThrottled(Boolean value) Iftrue, concrete, expanded or aliased indices will be ignored when frozen.final SearchRequest.BuilderignoreUnavailable(Boolean value) Iffalse, the request returns an error if it targets a missing or closed index.final SearchRequest.BuilderComma-separated list of data streams, indices, and aliases to search.final SearchRequest.BuilderComma-separated list of data streams, indices, and aliases to search.final SearchRequest.BuilderindicesBoost(List<Map<String, Double>> list) Boosts the _score of documents from specified indices.final SearchRequest.BuilderBoosts the _score of documents from specified indices.final SearchRequest.BuilderDefines the approximate kNN search to run.final SearchRequest.BuilderDefines the approximate kNN search to run.final SearchRequest.BuilderDefines the approximate kNN search to run.final SearchRequest.BuilderIftrue, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.final SearchRequest.BuildermaxConcurrentShardRequests(Long value) Defines the number of concurrent shard requests per node this search executes concurrently.final SearchRequest.BuilderminCompatibleShardNode(String value) The minimum version of the node that can handle the request Any handling node with a lower version will fail the request.final SearchRequest.BuilderMinimum_scorefor matching documents.final SearchRequest.Builderpit(PointInTimeReference value) Limits the search to a point in time (PIT).final SearchRequest.BuilderLimits the search to a point in time (PIT).final SearchRequest.BuilderpostFilter(Query value) Use thepost_filterparameter to filter search results.final SearchRequest.BuilderUse thepost_filterparameter to filter search results.final SearchRequest.Builderpreference(String value) Nodes and shards used for the search.final SearchRequest.BuilderpreFilterShardSize(Long value) Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold.final SearchRequest.BuilderSet totrueto return detailed timing information about the execution of individual components in a search request.final SearchRequest.BuilderQuery in the Lucene query string syntax using query parameter search.final SearchRequest.BuilderDefines the search definition using the Query DSL.final SearchRequest.BuilderDefines the search definition using the Query DSL.final SearchRequest.BuilderDefines the Reciprocal Rank Fusion (RRF) to use.final SearchRequest.BuilderDefines the Reciprocal Rank Fusion (RRF) to use.final SearchRequest.BuilderrequestCache(Boolean value) Iftrue, the caching of search results is enabled for requests wheresizeis0.final SearchRequest.BuilderCan be used to improve precision by reordering just the top (for example 100 - 500) documents returned by thequeryandpost_filterphases.final SearchRequest.BuilderCan be used to improve precision by reordering just the top (for example 100 - 500) documents returned by thequeryandpost_filterphases.final SearchRequest.BuilderCan be used to improve precision by reordering just the top (for example 100 - 500) documents returned by thequeryandpost_filterphases.final SearchRequest.BuilderCustom value used to route operations to a specific shard.final SearchRequest.BuilderruntimeMappings(String key, RuntimeField value) Defines one or more runtime fields in the search request.final SearchRequest.BuilderDefines one or more runtime fields in the search request.final SearchRequest.BuilderruntimeMappings(Map<String, RuntimeField> map) Defines one or more runtime fields in the search request.final SearchRequest.BuilderscriptFields(String key, ScriptField value) Retrieve a script evaluation (based on different fields) for each hit.final SearchRequest.BuilderRetrieve a script evaluation (based on different fields) for each hit.final SearchRequest.BuilderscriptFields(Map<String, ScriptField> map) Retrieve a script evaluation (based on different fields) for each hit.final SearchRequest.BuilderPeriod to retain the search context for scrolling.final SearchRequest.BuilderPeriod to retain the search context for scrolling.final SearchRequest.BuildersearchAfter(FieldValue value, FieldValue... values) Used to retrieve the next page of hits using a set of sort values from the previous page.final SearchRequest.BuilderUsed to retrieve the next page of hits using a set of sort values from the previous page.final SearchRequest.BuildersearchAfter(List<FieldValue> list) Used to retrieve the next page of hits using a set of sort values from the previous page.final SearchRequest.BuildersearchType(SearchType value) How distributed term frequencies are calculated for relevance scoring.protected SearchRequest.Builderself()final SearchRequest.BuilderseqNoPrimaryTerm(Boolean value) Iftrue, returns sequence number and primary term of the last modification of each hit.final SearchRequest.BuilderThe number of hits to return.final SearchRequest.Builderslice(SlicedScroll value) Can be used to split a scrolled search into multiple slices that can be consumed independently.final SearchRequest.BuilderCan be used to split a scrolled search into multiple slices that can be consumed independently.final SearchRequest.Buildersort(SortOptions value, SortOptions... values) A comma-separated list of <field>:<direction> pairs.final SearchRequest.BuilderA comma-separated list of <field>:<direction> pairs.final SearchRequest.Buildersort(List<SortOptions> list) A comma-separated list of <field>:<direction> pairs.final SearchRequest.Buildersource(SourceConfig value) Indicates which source fields are returned for matching documents.final SearchRequest.BuilderIndicates which source fields are returned for matching documents.final SearchRequest.BuilderStats groups to associate with the search.final SearchRequest.BuilderStats groups to associate with the search.final SearchRequest.BuilderstoredFields(String value, String... values) List of stored fields to return as part of a hit.final SearchRequest.BuilderstoredFields(List<String> list) List of stored fields to return as part of a hit.final SearchRequest.BuilderDefines a suggester that provides similar looking terms based on a provided text.final SearchRequest.BuilderDefines a suggester that provides similar looking terms based on a provided text.final SearchRequest.BuilderterminateAfter(Long value) Maximum number of documents to collect for each shard.final SearchRequest.BuilderSpecifies the period of time to wait for a response from each shard.final SearchRequest.BuildertrackScores(Boolean value) If true, calculate and return document scores, even if the scores are not used for sorting.final SearchRequest.BuildertrackTotalHits(TrackHits value) Number of hits matching the query to count accurately.final SearchRequest.BuilderNumber of hits matching the query to count accurately.final SearchRequest.BuilderIf true, returns document version as part of a hit.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
source
Indicates which source fields are returned for matching documents. These fields are returned in the hits._source property of the search response.API name:
_source -
source
public final SearchRequest.Builder source(Function<SourceConfig.Builder, ObjectBuilder<SourceConfig>> fn) Indicates which source fields are returned for matching documents. These fields are returned in the hits._source property of the search response.API name:
_source -
aggregations
Defines the aggregations that are run as part of the search request.API name:
aggregationsAdds all entries of
maptoaggregations. -
aggregations
Defines the aggregations that are run as part of the search request.API name:
aggregationsAdds an entry to
aggregations. -
aggregations
public final SearchRequest.Builder aggregations(String key, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) Defines the aggregations that are run as part of the search request.API name:
aggregationsAdds an entry to
aggregationsusing a builder lambda. -
allowNoIndices
Iffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*returns an error if an index starts withfoobut no index starts withbar.API name:
allow_no_indices -
allowPartialSearchResults
If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results.API name:
allow_partial_search_results -
analyzeWildcard
If true, wildcard and prefix queries are analyzed. This parameter can only be used when the q query string parameter is specified.API name:
analyze_wildcard -
analyzer
Analyzer to use for the query string. This parameter can only be used when the q query string parameter is specified.API name:
analyzer -
batchedReduceSize
The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.API name:
batched_reduce_size -
ccsMinimizeRoundtrips
If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests.API name:
ccs_minimize_roundtrips -
collapse
Collapses search results the values of the specified field.API name:
collapse -
collapse
public final SearchRequest.Builder collapse(Function<FieldCollapse.Builder, ObjectBuilder<FieldCollapse>> fn) Collapses search results the values of the specified field.API name:
collapse -
defaultOperator
The default operator for query string query: AND or OR. This parameter can only be used when theqquery string parameter is specified.API name:
default_operator -
df
Field to use as default where no field prefix is given in the query string. This parameter can only be used when the q query string parameter is specified.API name:
df -
docvalueFields
Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in thehits.fieldsproperty of the response.API name:
docvalue_fieldsAdds all elements of
listtodocvalueFields. -
docvalueFields
Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in thehits.fieldsproperty of the response.API name:
docvalue_fieldsAdds one or more values to
docvalueFields. -
docvalueFields
public final SearchRequest.Builder docvalueFields(Function<FieldAndFormat.Builder, ObjectBuilder<FieldAndFormat>> fn) Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in thehits.fieldsproperty of the response.API name:
docvalue_fieldsAdds a value to
docvalueFieldsusing a builder lambda. -
expandWildcards
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards. -
expandWildcards
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden.API name:
expand_wildcardsAdds one or more values to
expandWildcards. -
explain
If true, returns detailed information about score computation as part of a hit.API name:
explain -
ext
Configuration of search extensions defined by Elasticsearch plugins.API name:
extAdds all entries of
maptoext. -
ext
Configuration of search extensions defined by Elasticsearch plugins.API name:
extAdds an entry to
ext. -
fields
Array of wildcard (*) patterns. The request returns values for field names matching these patterns in thehits.fieldsproperty of the response.API name:
fieldsAdds all elements of
listtofields. -
fields
Array of wildcard (*) patterns. The request returns values for field names matching these patterns in thehits.fieldsproperty of the response.API name:
fieldsAdds one or more values to
fields. -
fields
public final SearchRequest.Builder fields(Function<FieldAndFormat.Builder, ObjectBuilder<FieldAndFormat>> fn) Array of wildcard (*) patterns. The request returns values for field names matching these patterns in thehits.fieldsproperty of the response.API name:
fieldsAdds a value to
fieldsusing a builder lambda. -
from
Starting document offset. Needs to be non-negative. By default, you cannot page through more than 10,000 hits using thefromandsizeparameters. To page through more hits, use thesearch_afterparameter.API name:
from -
highlight
Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.API name:
highlight -
highlight
public final SearchRequest.Builder highlight(Function<Highlight.Builder, ObjectBuilder<Highlight>> fn) Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.API name:
highlight -
ignoreThrottled
Iftrue, concrete, expanded or aliased indices will be ignored when frozen.API name:
ignore_throttled -
index
Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*). To search all data streams and indices, omit this parameter or use*or_all.API name:
indexAdds all elements of
listtoindex. -
index
Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*). To search all data streams and indices, omit this parameter or use*or_all.API name:
indexAdds one or more values to
index. -
indicesBoost
Boosts the _score of documents from specified indices.API name:
indices_boostAdds all elements of
listtoindicesBoost. -
indicesBoost
public final SearchRequest.Builder indicesBoost(Map<String, Double> value, Map<String, Double>... values) Boosts the _score of documents from specified indices.API name:
indices_boostAdds one or more values to
indicesBoost. -
knn
Defines the approximate kNN search to run.API name:
knnAdds all elements of
listtoknn. -
knn
Defines the approximate kNN search to run.API name:
knnAdds one or more values to
knn. -
knn
Defines the approximate kNN search to run.API name:
knnAdds a value to
knnusing a builder lambda. -
lenient
Iftrue, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can only be used when theqquery string parameter is specified.API name:
lenient -
maxConcurrentShardRequests
Defines the number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.API name:
max_concurrent_shard_requests -
minCompatibleShardNode
The minimum version of the node that can handle the request Any handling node with a lower version will fail the request.API name:
min_compatible_shard_node -
minScore
Minimum_scorefor matching documents. Documents with a lower_scoreare not included in the search results.API name:
min_score -
pit
Limits the search to a point in time (PIT). If you provide a PIT, you cannot specify an<index>in the request path.API name:
pit -
pit
public final SearchRequest.Builder pit(Function<PointInTimeReference.Builder, ObjectBuilder<PointInTimeReference>> fn) Limits the search to a point in time (PIT). If you provide a PIT, you cannot specify an<index>in the request path.API name:
pit -
postFilter
Use thepost_filterparameter to filter search results. The search hits are filtered after the aggregations are calculated. A post filter has no impact on the aggregation results.API name:
post_filter -
postFilter
Use thepost_filterparameter to filter search results. The search hits are filtered after the aggregations are calculated. A post filter has no impact on the aggregation results.API name:
post_filter -
preFilterShardSize
Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). When unspecified, the pre-filter phase is executed if any of these conditions is met: the request targets more than 128 shards; the request targets one or more read-only index; the primary sort of the query targets an indexed field.API name:
pre_filter_shard_size -
preference
Nodes and shards used for the search. By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are:_only_localto run the search only on shards on the local node;_localto, if possible, run the search on shards on the local node, or if not, select shards using the default method;_only_nodes:<node-id>,<node-id>to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method;_prefer_nodes:<node-id>,<node-id>to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method;_shards:<shard>,<shard>to run the search only on the specified shards;<custom-string>(any string that does not start with_) to route searches with the same<custom-string>to the same shards in the same order.API name:
preference -
profile
Set totrueto return detailed timing information about the execution of individual components in a search request. NOTE: This is a debugging tool and adds significant overhead to search execution.API name:
profile -
q
Query in the Lucene query string syntax using query parameter search. Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.API name:
q -
query
Defines the search definition using the Query DSL.API name:
query -
query
Defines the search definition using the Query DSL.API name:
query -
rank
Defines the Reciprocal Rank Fusion (RRF) to use.API name:
rank -
rank
Defines the Reciprocal Rank Fusion (RRF) to use.API name:
rank -
requestCache
Iftrue, the caching of search results is enabled for requests wheresizeis0. Defaults to index level settings.API name:
request_cache -
rescore
Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by thequeryandpost_filterphases.API name:
rescoreAdds all elements of
listtorescore. -
rescore
Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by thequeryandpost_filterphases.API name:
rescoreAdds one or more values to
rescore. -
rescore
Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by thequeryandpost_filterphases.API name:
rescoreAdds a value to
rescoreusing a builder lambda. -
routing
Custom value used to route operations to a specific shard.API name:
routing -
runtimeMappings
Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.API name:
runtime_mappingsAdds all entries of
maptoruntimeMappings. -
runtimeMappings
Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.API name:
runtime_mappingsAdds an entry to
runtimeMappings. -
runtimeMappings
public final SearchRequest.Builder runtimeMappings(String key, Function<RuntimeField.Builder, ObjectBuilder<RuntimeField>> fn) Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.API name:
runtime_mappingsAdds an entry to
runtimeMappingsusing a builder lambda. -
scriptFields
Retrieve a script evaluation (based on different fields) for each hit.API name:
script_fieldsAdds all entries of
maptoscriptFields. -
scriptFields
Retrieve a script evaluation (based on different fields) for each hit.API name:
script_fieldsAdds an entry to
scriptFields. -
scriptFields
public final SearchRequest.Builder scriptFields(String key, Function<ScriptField.Builder, ObjectBuilder<ScriptField>> fn) Retrieve a script evaluation (based on different fields) for each hit.API name:
script_fieldsAdds an entry to
scriptFieldsusing a builder lambda. -
scroll
Period to retain the search context for scrolling. See Scroll search results. By default, this value cannot exceed1d(24 hours). You can change this limit using thesearch.max_keep_alivecluster-level setting.API name:
scroll -
scroll
Period to retain the search context for scrolling. See Scroll search results. By default, this value cannot exceed1d(24 hours). You can change this limit using thesearch.max_keep_alivecluster-level setting.API name:
scroll -
searchAfter
Used to retrieve the next page of hits using a set of sort values from the previous page.API name:
search_afterAdds all elements of
listtosearchAfter. -
searchAfter
Used to retrieve the next page of hits using a set of sort values from the previous page.API name:
search_afterAdds one or more values to
searchAfter. -
searchAfter
public final SearchRequest.Builder searchAfter(Function<FieldValue.Builder, ObjectBuilder<FieldValue>> fn) Used to retrieve the next page of hits using a set of sort values from the previous page.API name:
search_afterAdds a value to
searchAfterusing a builder lambda. -
searchType
How distributed term frequencies are calculated for relevance scoring.API name:
search_type -
seqNoPrimaryTerm
Iftrue, returns sequence number and primary term of the last modification of each hit.API name:
seq_no_primary_term -
size
The number of hits to return. By default, you cannot page through more than 10,000 hits using thefromandsizeparameters. To page through more hits, use thesearch_afterparameter.API name:
size -
slice
Can be used to split a scrolled search into multiple slices that can be consumed independently.API name:
slice -
slice
public final SearchRequest.Builder slice(Function<SlicedScroll.Builder, ObjectBuilder<SlicedScroll>> fn) Can be used to split a scrolled search into multiple slices that can be consumed independently.API name:
slice -
sort
A comma-separated list of <field>:<direction> pairs.API name:
sortAdds all elements of
listtosort. -
sort
A comma-separated list of <field>:<direction> pairs.API name:
sortAdds one or more values to
sort. -
sort
public final SearchRequest.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) A comma-separated list of <field>:<direction> pairs.API name:
sortAdds a value to
sortusing a builder lambda. -
stats
Stats groups to associate with the search. Each group maintains a statistics aggregation for its associated searches. You can retrieve these stats using the indices stats API.API name:
statsAdds all elements of
listtostats. -
stats
Stats groups to associate with the search. Each group maintains a statistics aggregation for its associated searches. You can retrieve these stats using the indices stats API.API name:
statsAdds one or more values to
stats. -
storedFields
List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the_sourceparameter defaults tofalse. You can pass_source: trueto return both source fields and stored fields in the search response.API name:
stored_fieldsAdds all elements of
listtostoredFields. -
storedFields
List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the_sourceparameter defaults tofalse. You can pass_source: trueto return both source fields and stored fields in the search response.API name:
stored_fieldsAdds one or more values to
storedFields. -
suggest
Defines a suggester that provides similar looking terms based on a provided text.API name:
suggest -
suggest
Defines a suggester that provides similar looking terms based on a provided text.API name:
suggest -
terminateAfter
Maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting. Use with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. If set to0(default), the query does not terminate early.API name:
terminate_after -
timeout
Specifies the period of time to wait for a response from each shard. If no response is received before the timeout expires, the request fails and returns an error. Defaults to no timeout.API name:
timeout -
trackScores
If true, calculate and return document scores, even if the scores are not used for sorting.API name:
track_scores -
trackTotalHits
Number of hits matching the query to count accurately. Iftrue, the exact number of hits is returned at the cost of some performance. Iffalse, the response does not include the total number of hits matching the query.API name:
track_total_hits -
trackTotalHits
public final SearchRequest.Builder trackTotalHits(Function<TrackHits.Builder, ObjectBuilder<TrackHits>> fn) Number of hits matching the query to count accurately. Iftrue, the exact number of hits is returned at the cost of some performance. Iffalse, the response does not include the total number of hits matching the query.API name:
track_total_hits -
version
If true, returns document version as part of a hit.API name:
version -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<SearchRequest.Builder>
-
build
Builds aSearchRequest.- Specified by:
buildin interfaceObjectBuilder<SearchRequest>- Throws:
NullPointerException- if some of the required fields are null.
-