Files
elasticsearch-js/docs/reference-async_search-submit.asciidoc
2024-12-05 14:46:46 -06:00

127 lines
7.3 KiB
Plaintext

[[reference-async_search-submit]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
[discrete]
=== client.asyncSearch.submit
Run an async search. 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.
{ref}/async-search.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(AsyncSearchSubmitRequest, options?): Promise<AsyncSearchSubmitResponse>
----
[discrete]
===== `AsyncSearchSubmitRequest`
[source,ts]
----
interface AsyncSearchSubmitRequest extends <<shared-type-request-base, RequestBase>> {
index?: <<shared-type-indices, Indices>>
wait_for_completion_timeout?: <<shared-type-duration, Duration>>
keep_on_completion?: boolean
keep_alive?: <<shared-type-duration, Duration>>
allow_no_indices?: boolean
allow_partial_search_results?: boolean
analyzer?: string
analyze_wildcard?: boolean
batched_reduce_size?: <<shared-type-long, long>>
ccs_minimize_roundtrips?: boolean
default_operator?: QueryDslOperator
df?: string
expand_wildcards?: <<shared-type-expand-wildcards, ExpandWildcards>>
ignore_throttled?: boolean
ignore_unavailable?: boolean
lenient?: boolean
max_concurrent_shard_requests?: <<shared-type-long, long>>
min_compatible_shard_node?: <<shared-type-version-string, VersionString>>
preference?: string
pre_filter_shard_size?: <<shared-type-long, long>>
request_cache?: boolean
routing?: <<shared-type-routing, Routing>>
scroll?: <<shared-type-duration, Duration>>
search_type?: <<shared-type-search-type, SearchType>>
suggest_field?: <<shared-type-field, Field>>
suggest_mode?: <<shared-type-suggest-mode, SuggestMode>>
suggest_size?: <<shared-type-long, long>>
suggest_text?: string
typed_keys?: boolean
rest_total_hits_as_int?: boolean
_source_excludes?: <<shared-type-fields, Fields>>
_source_includes?: <<shared-type-fields, Fields>>
q?: string
aggregations?: Record<string, AggregationsAggregationContainer>
/** @alias aggregations */
aggs?: Record<string, AggregationsAggregationContainer>
collapse?: SearchFieldCollapse
explain?: boolean
ext?: Record<string, any>
from?: <<shared-type-integer, integer>>
highlight?: SearchHighlight
track_total_hits?: SearchTrackHits
indices_boost?: Record<<<shared-type-index-name, IndexName>>, <<shared-type-double, double>>>[]
docvalue_fields?: (QueryDslFieldAndFormat | <<shared-type-field, Field>>)[]
knn?: <<shared-type-knn-search, KnnSearch>> | <<shared-type-knn-search, KnnSearch>>[]
min_score?: <<shared-type-double, double>>
post_filter?: QueryDslQueryContainer
profile?: boolean
query?: QueryDslQueryContainer
rescore?: SearchRescore | SearchRescore[]
script_fields?: Record<string, <<shared-type-script-field, ScriptField>>>
search_after?: <<shared-type-sort-results, SortResults>>
size?: <<shared-type-integer, integer>>
slice?: <<shared-type-sliced-scroll, SlicedScroll>>
sort?: <<shared-type-sort, Sort>>
_source?: SearchSourceConfig
fields?: (QueryDslFieldAndFormat | <<shared-type-field, Field>>)[]
suggest?: SearchSuggester
terminate_after?: <<shared-type-long, long>>
timeout?: string
track_scores?: boolean
version?: boolean
seq_no_primary_term?: boolean
stored_fields?: <<shared-type-fields, Fields>>
pit?: SearchPointInTimeReference
runtime_mappings?: MappingRuntimeFields
stats?: string[]
}
----
[discrete]
===== `AsyncSearchSubmitResponse`
[source,ts]
----
type AsyncSearchSubmitResponse<TDocument = unknown, TAggregations = Record<<<shared-type-aggregate-name, AggregateName>>, AggregationsAggregate>> = AsyncSearchAsyncSearchDocumentResponseBase<TDocument, TAggregations>
----