Class SubmitRequest
- All Implemented Interfaces:
JsonpSerializable
When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.
Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
By default, Elasticsearch does not allow you to store an async search
response larger than 10Mb and an attempt to do this results in an error. The
maximum allowed size for a stored async search response can be set by
changing the search.max_async_search_response_size cluster level
setting.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<SubmitRequest>Json deserializer forSubmitRequeststatic final SimpleEndpoint<SubmitRequest,?> Endpoint "async_search.submit". -
Method Summary
Modifier and TypeMethodDescriptionfinal Map<String,Aggregation> API name:aggregationsfinal BooleanWhether to ignore if a wildcard indices expression resolves into no concrete indices.final BooleanIndicate if an error should be returned if there is a partial search failure or timeoutfinal Stringanalyzer()The analyzer to use for the query stringfinal BooleanSpecify whether wildcard and prefix queries should be analyzed (default: false)final LongAffects how often partial results become available, which happens whenever shard results are reduced.final BooleanThe default value is the only supported value.final FieldCollapsecollapse()API name:collapsestatic <TDocument>
Endpoint<SubmitRequest,SubmitResponse<TDocument>, ErrorResponse> createSubmitEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "async_search.submit" endpoint.final OperatorThe default operator for query string query (AND or OR)final Stringdf()The field to use as default where no field prefix is given in the query stringfinal List<FieldAndFormat>Array of wildcard (*) patterns.final List<ExpandWildcard>Whether to expand wildcard expression to concrete indices that are open, closed or both.final Booleanexplain()If true, returns detailed information about score computation as part of a hit.ext()Configuration of search extensions defined by Elasticsearch plugins.final List<FieldAndFormat>fields()Array of wildcard (*) patterns.final Integerfrom()Starting document offset.final HighlightAPI name:highlightfinal BooleanWhether specified concrete, expanded or aliased indices should be ignored when throttledfinal BooleanWhether specified concrete indices should be ignored when unavailable (missing or closed)index()A comma-separated list of index names to search; use_allor empty string to perform the operation on all indicesfinal List<NamedValue<Double>>Boosts the _score of documents from specified indices.final TimeSpecifies how long the async search needs to be available.final BooleanIftrue, results are stored for later retrieval when the search completes within thewait_for_completion_timeout.knn()Defines the approximate kNN search to run.final Booleanlenient()Specify whether format-based query failures (such as providing text to a numeric field) should be ignoredfinal IntegerThe number of concurrent shard requests per node this search executes concurrently.final DoubleminScore()Minimum _score for matching documents.static SubmitRequestfinal PointInTimeReferencepit()Limits the search to a point in time (PIT).final QueryAPI name:post_filterfinal StringSpecify the node or shard the operation should be performed on (default: random)final Booleanprofile()API name:profilefinal StringSpecifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax.final Stringq()Query in the Lucene query string syntaxfinal Queryquery()Defines the search definition using the Query DSL.final BooleanSpecify if request cache should be used for this request or not, defaults to truerescore()API name:rescorefinal Stringrouting()A comma-separated list of specific routing valuesfinal Map<String,RuntimeField> Defines one or more runtime fields in the search request.final Map<String,ScriptField> Retrieve a script evaluation (based on different fields) for each hit.final List<FieldValue>API name:search_afterfinal SearchTypeSearch operation typefinal BooleanIf true, returns sequence number and primary term of the last modification of each hit.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Integersize()The number of hits to return.final SlicedScrollslice()API name:slicefinal List<SortOptions>sort()API name:sortfinal SourceConfigsource()Indicates which source fields are returned for matching documents.stats()Stats groups to associate with the search.List of stored fields to return as part of a hit.final Suggestersuggest()API name:suggestfinal LongMaximum number of documents to collect for each shard.final Stringtimeout()Specifies the period of time to wait for a response from each shard.final BooleanIf true, calculate and return document scores, even if the scores are not used for sorting.final TrackHitsNumber of hits matching the query to count accurately.final Booleanversion()If true, returns document version as part of a hit.final TimeBlocks and waits until the search is completed up to a certain timeout.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forSubmitRequest -
_ENDPOINT
Endpoint "async_search.submit".
-
-
Method Details
-
of
-
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 -
aggregations
API name:aggregations -
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 -
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_fields -
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards -
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:
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:
fields -
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 -
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:
index -
indicesBoost
Boosts the _score of documents from specified indices.API name:
indices_boost -
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:
knn -
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 -
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 -
requestCache
Specify if request cache should be used for this request or not, defaults to trueAPI name:
request_cache -
rescore
API name:rescore -
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_mappings -
scriptFields
Retrieve a script evaluation (based on different fields) for each hit.API name:
script_fields -
searchAfter
API name:search_after -
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 -
sort
API name:sort -
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:
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_fields -
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 -
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 -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupSubmitRequestDeserializer
-
createSubmitEndpoint
public static <TDocument> Endpoint<SubmitRequest,SubmitResponse<TDocument>, createSubmitEndpointErrorResponse> (JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "async_search.submit" endpoint.
-