Class FleetSearchRequest.Builder
- All Implemented Interfaces:
WithJson<FleetSearchRequest.Builder>,ObjectBuilder<FleetSearchRequest>
- Enclosing class:
- FleetSearchRequest
FleetSearchRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregations(String key, Aggregation value) API name:aggregationsaggregations(String key, AggregationVariant value) API name:aggregationsAPI name:aggregationsaggregations(Map<String, Aggregation> map) API name:aggregationsallowNoIndices(Boolean value) API name:allow_no_indicesallowPartialSearchResults(Boolean value) If true, returns partial results if there are shard request timeouts or shard failures.API name:analyzeranalyzeWildcard(Boolean value) API name:analyze_wildcardbatchedReduceSize(Long value) API name:batched_reduce_sizebuild()Builds aFleetSearchRequest.ccsMinimizeRoundtrips(Boolean value) API name:ccs_minimize_roundtripscollapse(FieldCollapse value) API name:collapseAPI name:collapsedefaultOperator(Operator value) API name:default_operatorAPI name:dfdocvalueFields(FieldAndFormat value, FieldAndFormat... values) Array of wildcard (*) patterns.Array of wildcard (*) patterns.docvalueFields(List<FieldAndFormat> list) Array of wildcard (*) patterns.expandWildcards(ExpandWildcard value, ExpandWildcard... values) API name:expand_wildcardsexpandWildcards(List<ExpandWildcard> list) API name:expand_wildcardsIf true, returns detailed information about score computation as part of a hit.Configuration of search extensions defined by Elasticsearch plugins.Configuration of search extensions defined by Elasticsearch plugins.fields(FieldAndFormat value, FieldAndFormat... values) Array of wildcard (*) patterns.Array of wildcard (*) patterns.fields(List<FieldAndFormat> list) Array of wildcard (*) patterns.Starting document offset.API name:highlightAPI name:highlightignoreThrottled(Boolean value) API name:ignore_throttledignoreUnavailable(Boolean value) API name:ignore_unavailableRequired - A single target to search.indicesBoost(NamedValue<Double> value, NamedValue<Double>... values) Boosts the _score of documents from specified indices.indicesBoost(List<NamedValue<Double>> list) Boosts the _score of documents from specified indices.API name:lenientAPI name:max_concurrent_shard_requestsMinimum _score for matching documents.pit(PointInTimeReference value) Limits the search to a point in time (PIT).Limits the search to a point in time (PIT).postFilter(Query value) API name:post_filterpostFilter(QueryVariant value) API name:post_filterAPI name:post_filterpreference(String value) API name:preferencepreFilterShardSize(Long value) API name:pre_filter_shard_sizeAPI name:profileAPI name:qDefines the search definition using the Query DSL.query(QueryVariant value) Defines the search definition using the Query DSL.Defines the search definition using the Query DSL.requestCache(Boolean value) API name:request_cacheAPI name:rescorerescore(RescoreVariant value, RescoreVariant... values) API name:rescoreAPI name:rescoreAPI name:rescoreAPI name:routingruntimeMappings(String key, RuntimeField value) Defines one or more runtime fields in the search request.Defines one or more runtime fields in the search request.runtimeMappings(Map<String, RuntimeField> map) Defines one or more runtime fields in the search request.scriptFields(String key, ScriptField value) Retrieve a script evaluation (based on different fields) for each hit.Retrieve a script evaluation (based on different fields) for each hit.scriptFields(Map<String, ScriptField> map) Retrieve a script evaluation (based on different fields) for each hit.API name:scrollAPI name:scrollsearchAfter(boolean value, boolean... values) API name:search_aftersearchAfter(double value, double... values) API name:search_aftersearchAfter(long value, long... values) API name:search_aftersearchAfter(FieldValue value, FieldValue... values) API name:search_aftersearchAfter(String value, String... values) API name:search_afterAPI name:search_aftersearchAfter(List<FieldValue> list) API name:search_aftersearchType(SearchType value) API name:search_typeprotected FleetSearchRequest.Builderself()seqNoPrimaryTerm(Boolean value) If true, returns sequence number and primary term of the last modification of each hit.The number of hits to return.slice(SlicedScroll value) API name:sliceAPI name:slicesort(SortOptions value, SortOptions... values) API name:sortAPI name:sortsort(List<SortOptions> list) API name:sortsource(SourceConfig value) Indicates which source fields are returned for matching documents.Indicates which source fields are returned for matching documents.Stats groups to associate with the search.Stats groups to associate with the search.storedFields(String value, String... values) List of stored fields to return as part of a hit.storedFields(List<String> list) List of stored fields to return as part of a hit.API name:suggestAPI name:suggestterminateAfter(Long value) Maximum number of documents to collect for each shard.Specifies the period of time to wait for a response from each shard.trackScores(Boolean value) If true, calculate and return document scores, even if the scores are not used for sorting.trackTotalHits(TrackHits value) Number of hits matching the query to count accurately.Number of hits matching the query to count accurately.If true, returns document version as part of a hit.waitForCheckpoints(Long value, Long... values) A comma separated list of checkpoints.waitForCheckpoints(List<Long> list) A comma separated list of checkpoints.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 FleetSearchRequest.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
API name:aggregationsAdds all entries of
maptoaggregations. -
aggregations
API name:aggregationsAdds an entry to
aggregations. -
aggregations
API name:aggregationsAdds an entry to
aggregations. -
aggregations
public final FleetSearchRequest.Builder aggregations(String key, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) API name:aggregationsAdds an entry to
aggregationsusing a builder lambda. -
allowNoIndices
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. Defaults to the configured cluster settingsearch.default_allow_partial_results, which is true by default.API name:
allow_partial_search_results -
analyzeWildcard
API name:analyze_wildcard -
analyzer
API name:analyzer -
batchedReduceSize
API name:batched_reduce_size -
ccsMinimizeRoundtrips
API name:ccs_minimize_roundtrips -
collapse
API name:collapse -
collapse
public final FleetSearchRequest.Builder collapse(Function<FieldCollapse.Builder, ObjectBuilder<FieldCollapse>> fn) API name:collapse -
defaultOperator
API name:default_operator -
df
API name:df -
docvalueFields
Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in the hits.fields property of the response.API name:
docvalue_fieldsAdds all elements of
listtodocvalueFields. -
docvalueFields
public final FleetSearchRequest.Builder docvalueFields(FieldAndFormat value, FieldAndFormat... values) Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in the hits.fields property of the response.API name:
docvalue_fieldsAdds one or more values to
docvalueFields. -
docvalueFields
public final FleetSearchRequest.Builder docvalueFields(Function<FieldAndFormat.Builder, ObjectBuilder<FieldAndFormat>> fn) Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in the hits.fields property of the response.API name:
docvalue_fieldsAdds a value to
docvalueFieldsusing a builder lambda. -
expandWildcards
API name:expand_wildcardsAdds all elements of
listtoexpandWildcards. -
expandWildcards
public final FleetSearchRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) 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 the hits.fields property 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 the hits.fields property of the response.API name:
fieldsAdds one or more values to
fields. -
fields
public final FleetSearchRequest.Builder fields(Function<FieldAndFormat.Builder, ObjectBuilder<FieldAndFormat>> fn) Array of wildcard (*) patterns. The request returns values for field names matching these patterns in the hits.fields property of the response.API name:
fieldsAdds a value to
fieldsusing a builder lambda. -
from
Starting document offset. By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the search_after parameter.API name:
from -
highlight
API name:highlight -
highlight
public final FleetSearchRequest.Builder highlight(Function<Highlight.Builder, ObjectBuilder<Highlight>> fn) API name:highlight -
ignoreThrottled
API name:ignore_throttled -
index
Required - A single target to search. If the target is an index alias, it must resolve to a single index.API name:
index -
indicesBoost
Boosts the _score of documents from specified indices.API name:
indices_boostAdds all elements of
listtoindicesBoost. -
indicesBoost
@SafeVarargs public final FleetSearchRequest.Builder indicesBoost(NamedValue<Double> value, NamedValue<Double>... values) Boosts the _score of documents from specified indices.API name:
indices_boostAdds one or more values to
indicesBoost. -
lenient
API name:lenient -
maxConcurrentShardRequests
API name:max_concurrent_shard_requests -
minScore
Minimum _score for matching documents. Documents with a lower _score are not included in search results and results collected by aggregations.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 FleetSearchRequest.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
API name:post_filter -
postFilter
API name:post_filter -
postFilter
API name:post_filter -
preFilterShardSize
API name:pre_filter_shard_size -
preference
API name:preference -
profile
API name:profile -
q
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 -
query
Defines the search definition using the Query DSL.API name:
query -
requestCache
API name:request_cache -
rescore
API name:rescoreAdds all elements of
listtorescore. -
rescore
API name:rescoreAdds one or more values to
rescore. -
rescore
API name:rescoreAdds one or more values to
rescore. -
rescore
public final FleetSearchRequest.Builder rescore(Function<Rescore.Builder, ObjectBuilder<Rescore>> fn) API name:rescoreAdds a value to
rescoreusing a builder lambda. -
routing
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 FleetSearchRequest.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 FleetSearchRequest.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
API name:scroll -
scroll
API name:scroll -
searchAfter
API name:search_afterAdds all elements of
listtosearchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
public final FleetSearchRequest.Builder searchAfter(Function<FieldValue.Builder, ObjectBuilder<FieldValue>> fn) API name:search_afterAdds a value to
searchAfterusing a builder lambda. -
searchType
API name:search_type -
seqNoPrimaryTerm
If true, returns sequence number and primary term of the last modification of each hit. See Optimistic concurrency control.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 the from and size parameters. To page through more hits, use the search_after parameter.API name:
size -
slice
API name:slice -
slice
public final FleetSearchRequest.Builder slice(Function<SlicedScroll.Builder, ObjectBuilder<SlicedScroll>> fn) API name:slice -
sort
API name:sortAdds all elements of
listtosort. -
sort
API name:sortAdds one or more values to
sort. -
sort
public final FleetSearchRequest.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) 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 _source parameter defaults to false. You can pass _source: true to 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 _source parameter defaults to false. You can pass _source: true to return both source fields and stored fields in the search response.API name:
stored_fieldsAdds one or more values to
storedFields. -
suggest
API name:suggest -
suggest
public final FleetSearchRequest.Builder suggest(Function<Suggester.Builder, ObjectBuilder<Suggester>> fn) 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. Defaults to 0, which does not terminate query execution 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. If true, the exact number of hits is returned at the cost of some performance. If false, the response does not include the total number of hits matching the query. Defaults to 10,000 hits.API name:
track_total_hits -
trackTotalHits
public final FleetSearchRequest.Builder trackTotalHits(Function<TrackHits.Builder, ObjectBuilder<TrackHits>> fn) Number of hits matching the query to count accurately. If true, the exact number of hits is returned at the cost of some performance. If false, the response does not include the total number of hits matching the query. Defaults to 10,000 hits.API name:
track_total_hits -
version
If true, returns document version as part of a hit.API name:
version -
waitForCheckpoints
A comma separated list of checkpoints. When configured, the search API will only be executed on a shard after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause Elasticsearch to immediately execute the search.API name:
wait_for_checkpointsAdds all elements of
listtowaitForCheckpoints. -
waitForCheckpoints
A comma separated list of checkpoints. When configured, the search API will only be executed on a shard after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause Elasticsearch to immediately execute the search.API name:
wait_for_checkpointsAdds one or more values to
waitForCheckpoints. -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<FleetSearchRequest.Builder>
-
build
Builds aFleetSearchRequest.- Specified by:
buildin interfaceObjectBuilder<FleetSearchRequest>- Throws:
NullPointerException- if some of the required fields are null.
-