Class SubmitRequest.Builder
- All Implemented Interfaces:
WithJson<SubmitRequest.Builder>,ObjectBuilder<SubmitRequest>
- Enclosing class:
- SubmitRequest
SubmitRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal SubmitRequest.Builderaggregations(String key, Aggregation value) API name:aggregationsfinal SubmitRequest.Builderaggregations(String key, AggregationVariant value) API name:aggregationsfinal SubmitRequest.BuilderAPI name:aggregationsfinal SubmitRequest.Builderaggregations(Map<String, Aggregation> map) API name:aggregationsfinal SubmitRequest.BuilderallowNoIndices(Boolean value) Whether to ignore if a wildcard indices expression resolves into no concrete indices.final SubmitRequest.BuilderallowPartialSearchResults(Boolean value) Indicate if an error should be returned if there is a partial search failure or timeoutfinal SubmitRequest.BuilderThe analyzer to use for the query stringfinal SubmitRequest.BuilderanalyzeWildcard(Boolean value) Specify whether wildcard and prefix queries should be analyzed (default: false)final SubmitRequest.BuilderbatchedReduceSize(Long value) Affects how often partial results become available, which happens whenever shard results are reduced.build()Builds aSubmitRequest.final SubmitRequest.BuilderccsMinimizeRoundtrips(Boolean value) The default value is the only supported value.final SubmitRequest.Buildercollapse(FieldCollapse value) API name:collapsefinal SubmitRequest.BuilderAPI name:collapsefinal SubmitRequest.BuilderdefaultOperator(Operator value) The default operator for query string query (AND or OR)final SubmitRequest.BuilderThe field to use as default where no field prefix is given in the query stringfinal SubmitRequest.BuilderdocvalueFields(FieldAndFormat value, FieldAndFormat... values) Array of wildcard (*) patterns.final SubmitRequest.BuilderArray of wildcard (*) patterns.final SubmitRequest.BuilderdocvalueFields(List<FieldAndFormat> list) Array of wildcard (*) patterns.final SubmitRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values) Whether to expand wildcard expression to concrete indices that are open, closed or both.final SubmitRequest.BuilderexpandWildcards(List<ExpandWildcard> list) Whether to expand wildcard expression to concrete indices that are open, closed or both.final SubmitRequest.BuilderIf true, returns detailed information about score computation as part of a hit.final SubmitRequest.BuilderConfiguration of search extensions defined by Elasticsearch plugins.final SubmitRequest.BuilderConfiguration of search extensions defined by Elasticsearch plugins.final SubmitRequest.Builderfields(FieldAndFormat value, FieldAndFormat... values) Array of wildcard (*) patterns.final SubmitRequest.BuilderArray of wildcard (*) patterns.final SubmitRequest.Builderfields(List<FieldAndFormat> list) Array of wildcard (*) patterns.final SubmitRequest.BuilderStarting document offset.final SubmitRequest.BuilderAPI name:highlightfinal SubmitRequest.BuilderAPI name:highlightfinal SubmitRequest.BuilderignoreThrottled(Boolean value) Whether specified concrete, expanded or aliased indices should be ignored when throttledfinal SubmitRequest.BuilderignoreUnavailable(Boolean value) Whether specified concrete indices should be ignored when unavailable (missing or closed)final SubmitRequest.BuilderA comma-separated list of index names to search; use_allor empty string to perform the operation on all indicesfinal SubmitRequest.BuilderA comma-separated list of index names to search; use_allor empty string to perform the operation on all indicesfinal SubmitRequest.BuilderindicesBoost(NamedValue<Double> value, NamedValue<Double>... values) Boosts the _score of documents from specified indices.final SubmitRequest.BuilderindicesBoost(List<NamedValue<Double>> list) Boosts the _score of documents from specified indices.final SubmitRequest.BuilderSpecifies how long the async search needs to be available.final SubmitRequest.BuilderSpecifies how long the async search needs to be available.final SubmitRequest.BuilderkeepOnCompletion(Boolean value) Iftrue, results are stored for later retrieval when the search completes within thewait_for_completion_timeout.final SubmitRequest.BuilderDefines the approximate kNN search to run.final SubmitRequest.BuilderDefines the approximate kNN search to run.final SubmitRequest.BuilderDefines the approximate kNN search to run.final SubmitRequest.BuilderSpecify whether format-based query failures (such as providing text to a numeric field) should be ignoredfinal SubmitRequest.BuilderThe number of concurrent shard requests per node this search executes concurrently.final SubmitRequest.BuilderMinimum _score for matching documents.final SubmitRequest.Builderpit(PointInTimeReference value) Limits the search to a point in time (PIT).final SubmitRequest.BuilderLimits the search to a point in time (PIT).final SubmitRequest.BuilderpostFilter(Query value) API name:post_filterfinal SubmitRequest.BuilderpostFilter(QueryVariant value) API name:post_filterfinal SubmitRequest.BuilderAPI name:post_filterfinal SubmitRequest.Builderpreference(String value) Specify the node or shard the operation should be performed on (default: random)final SubmitRequest.BuilderAPI name:profilefinal SubmitRequest.BuilderprojectRouting(String value) Specifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax.final SubmitRequest.BuilderQuery in the Lucene query string syntaxfinal SubmitRequest.BuilderDefines the search definition using the Query DSL.final SubmitRequest.Builderquery(QueryVariant value) Defines the search definition using the Query DSL.final SubmitRequest.BuilderDefines the search definition using the Query DSL.final SubmitRequest.BuilderrequestCache(Boolean value) Specify if request cache should be used for this request or not, defaults to truefinal SubmitRequest.BuilderAPI name:rescorefinal SubmitRequest.Builderrescore(RescoreVariant value, RescoreVariant... values) API name:rescorefinal SubmitRequest.BuilderAPI name:rescorefinal SubmitRequest.BuilderAPI name:rescorefinal SubmitRequest.BuilderA comma-separated list of specific routing valuesfinal SubmitRequest.BuilderruntimeMappings(String key, RuntimeField value) Defines one or more runtime fields in the search request.final SubmitRequest.BuilderDefines one or more runtime fields in the search request.final SubmitRequest.BuilderruntimeMappings(Map<String, RuntimeField> map) Defines one or more runtime fields in the search request.final SubmitRequest.BuilderscriptFields(String key, ScriptField value) Retrieve a script evaluation (based on different fields) for each hit.final SubmitRequest.BuilderRetrieve a script evaluation (based on different fields) for each hit.final SubmitRequest.BuilderscriptFields(Map<String, ScriptField> map) Retrieve a script evaluation (based on different fields) for each hit.final SubmitRequest.BuildersearchAfter(boolean value, boolean... values) API name:search_afterfinal SubmitRequest.BuildersearchAfter(double value, double... values) API name:search_afterfinal SubmitRequest.BuildersearchAfter(long value, long... values) API name:search_afterfinal SubmitRequest.BuildersearchAfter(FieldValue value, FieldValue... values) API name:search_afterfinal SubmitRequest.BuildersearchAfter(String value, String... values) API name:search_afterfinal SubmitRequest.BuilderAPI name:search_afterfinal SubmitRequest.BuildersearchAfter(List<FieldValue> list) API name:search_afterfinal SubmitRequest.BuildersearchType(SearchType value) Search operation typeprotected SubmitRequest.Builderself()final SubmitRequest.BuilderseqNoPrimaryTerm(Boolean value) If true, returns sequence number and primary term of the last modification of each hit.final SubmitRequest.BuilderThe number of hits to return.final SubmitRequest.Builderslice(SlicedScroll value) API name:slicefinal SubmitRequest.BuilderAPI name:slicefinal SubmitRequest.Buildersort(SortOptions value, SortOptions... values) API name:sortfinal SubmitRequest.BuilderAPI name:sortfinal SubmitRequest.Buildersort(List<SortOptions> list) API name:sortfinal SubmitRequest.Buildersource(SourceConfig value) Indicates which source fields are returned for matching documents.final SubmitRequest.BuilderIndicates which source fields are returned for matching documents.final SubmitRequest.BuilderStats groups to associate with the search.final SubmitRequest.BuilderStats groups to associate with the search.final SubmitRequest.BuilderstoredFields(String value, String... values) List of stored fields to return as part of a hit.final SubmitRequest.BuilderstoredFields(List<String> list) List of stored fields to return as part of a hit.final SubmitRequest.BuilderAPI name:suggestfinal SubmitRequest.BuilderAPI name:suggestfinal SubmitRequest.BuilderterminateAfter(Long value) Maximum number of documents to collect for each shard.final SubmitRequest.BuilderSpecifies the period of time to wait for a response from each shard.final SubmitRequest.BuildertrackScores(Boolean value) If true, calculate and return document scores, even if the scores are not used for sorting.final SubmitRequest.BuildertrackTotalHits(TrackHits value) Number of hits matching the query to count accurately.final SubmitRequest.BuilderNumber of hits matching the query to count accurately.final SubmitRequest.BuilderIf true, returns document version as part of a hit.final SubmitRequest.BuilderwaitForCompletionTimeout(Time value) Blocks and waits until the search is completed up to a certain timeout.final SubmitRequest.BuilderBlocks and waits until the search is completed up to a certain timeout.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 SubmitRequest.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 SubmitRequest.Builder aggregations(String key, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) API name:aggregationsAdds an entry to
aggregationsusing a builder lambda. -
allowNoIndices
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes_allstring or when no indices have been specified)API name:
allow_no_indices -
allowPartialSearchResults
Indicate if an error should be returned if there is a partial search failure or timeoutAPI name:
allow_partial_search_results -
analyzeWildcard
Specify whether wildcard and prefix queries should be analyzed (default: false)API name:
analyze_wildcard -
analyzer
The analyzer to use for the query stringAPI name:
analyzer -
batchedReduceSize
Affects how often partial results become available, which happens whenever shard results are reduced. A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).API name:
batched_reduce_size -
ccsMinimizeRoundtrips
The default value is the only supported value.API name:
ccs_minimize_roundtrips -
collapse
API name:collapse -
collapse
public final SubmitRequest.Builder collapse(Function<FieldCollapse.Builder, ObjectBuilder<FieldCollapse>> fn) API name:collapse -
defaultOperator
The default operator for query string query (AND or OR)API name:
default_operator -
df
The field to use as default where no field prefix is given in the query stringAPI 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
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 SubmitRequest.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
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards. -
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.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 SubmitRequest.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 SubmitRequest.Builder highlight(Function<Highlight.Builder, ObjectBuilder<Highlight>> fn) API name:highlight -
ignoreThrottled
Whether specified concrete, expanded or aliased indices should be ignored when throttledAPI name:
ignore_throttled -
index
A comma-separated list of index names to search; use_allor empty string to perform the operation on all indicesAPI name:
indexAdds all elements of
listtoindex. -
index
A comma-separated list of index names to search; use_allor empty string to perform the operation on all indicesAPI 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
@SafeVarargs public final SubmitRequest.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. -
keepAlive
Specifies how long the async search needs to be available. Ongoing async searches and any saved search results are deleted after this period.API name:
keep_alive -
keepAlive
Specifies how long the async search needs to be available. Ongoing async searches and any saved search results are deleted after this period.API name:
keep_alive -
keepOnCompletion
Iftrue, results are stored for later retrieval when the search completes within thewait_for_completion_timeout.API name:
keep_on_completion -
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
Specify whether format-based query failures (such as providing text to a numeric field) should be ignoredAPI name:
lenient -
maxConcurrentShardRequests
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 requestsAPI 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 SubmitRequest.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 -
preference
Specify the node or shard the operation should be performed on (default: random)API name:
preference -
profile
API name:profile -
projectRouting
Specifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax. Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project _alias:_origin _alias:pr Supported in serverless only.API name:
project_routing -
q
Query in the Lucene query string syntaxAPI 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
Specify if request cache should be used for this request or not, defaults to trueAPI 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
API name:rescoreAdds a value to
rescoreusing a builder lambda. -
routing
A comma-separated list of specific routing valuesAPI 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 SubmitRequest.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 SubmitRequest.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. -
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 SubmitRequest.Builder searchAfter(Function<FieldValue.Builder, ObjectBuilder<FieldValue>> fn) API name:search_afterAdds a value to
searchAfterusing a builder lambda. -
searchType
Search operation typeAPI 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 SubmitRequest.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 SubmitRequest.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
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 SubmitRequest.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 -
waitForCompletionTimeout
Blocks and waits until the search is completed up to a certain timeout. When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.API name:
wait_for_completion_timeout -
waitForCompletionTimeout
public final SubmitRequest.Builder waitForCompletionTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Blocks and waits until the search is completed up to a certain timeout. When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.API name:
wait_for_completion_timeout -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<SubmitRequest.Builder>
-
build
Builds aSubmitRequest.- Specified by:
buildin interfaceObjectBuilder<SubmitRequest>- Throws:
NullPointerException- if some of the required fields are null.
-