Files
elasticsearch-js/docs/reference/api/AsyncSearch.md
2025-05-28 10:02:30 -05:00

6.4 KiB

AsyncSearch [class-AsyncSearch]

Constructor

new AsyncSearch(transport: [Transport](./Transport.md));

Properties [class-properties-AsyncSearch]

Name Type Description
acceptedParams Record<string, { path: string[]; body: string[]; query: string[]; }>  
transport Transport  

Methods [class-methods-AsyncSearch]

Name Signature Description
delete delete(this: [That](./That.md), params: [AsyncSearchDeleteRequest](./AsyncSearchDeleteRequest.md), options?: [TransportRequestOptionsWithOutMeta](./TransportRequestOptionsWithOutMeta.md)): Promise<[AsyncSearchDeleteResponse](./AsyncSearchDeleteResponse.md)>; Delete an async search. If the asynchronous search is still running, it is cancelled. Otherwise, the saved search results are deleted. If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the cancel_task cluster privilege.
delete delete(this: [That](./That.md), params: [AsyncSearchDeleteRequest](./AsyncSearchDeleteRequest.md), options?: [TransportRequestOptionsWithMeta](./TransportRequestOptionsWithMeta.md)): Promise<[TransportResult](./TransportResult.md)<[AsyncSearchDeleteResponse](./AsyncSearchDeleteResponse.md), unknown>>;  
delete delete(this: [That](./That.md), params: [AsyncSearchDeleteRequest](./AsyncSearchDeleteRequest.md), options?: [TransportRequestOptions](./TransportRequestOptions.md)): Promise<[AsyncSearchDeleteResponse](./AsyncSearchDeleteResponse.md)>;  
get get<TDocument = unknown, TAggregations = Record<[AggregateName](./AggregateName.md), [AggregationsAggregate](./AggregationsAggregate.md)>>(this: [That](./That.md), params: [AsyncSearchGetRequest](./AsyncSearchGetRequest.md), options?: [TransportRequestOptionsWithOutMeta](./TransportRequestOptionsWithOutMeta.md)): Promise<[AsyncSearchGetResponse](./AsyncSearchGetResponse.md)<TDocument, TAggregations>>; Get async search results. Retrieve the results of a previously submitted asynchronous search request. If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
get get<TDocument = unknown, TAggregations = Record<[AggregateName](./AggregateName.md), [AggregationsAggregate](./AggregationsAggregate.md)>>(this: [That](./That.md), params: [AsyncSearchGetRequest](./AsyncSearchGetRequest.md), options?: [TransportRequestOptionsWithMeta](./TransportRequestOptionsWithMeta.md)): Promise<[TransportResult](./TransportResult.md)<[AsyncSearchGetResponse](./AsyncSearchGetResponse.md)<TDocument, TAggregations>, unknown>>;  
get get<TDocument = unknown, TAggregations = Record<[AggregateName](./AggregateName.md), [AggregationsAggregate](./AggregationsAggregate.md)>>(this: [That](./That.md), params: [AsyncSearchGetRequest](./AsyncSearchGetRequest.md), options?: [TransportRequestOptions](./TransportRequestOptions.md)): Promise<[AsyncSearchGetResponse](./AsyncSearchGetResponse.md)<TDocument, TAggregations>>;  
status status(this: [That](./That.md), params: [AsyncSearchStatusRequest](./AsyncSearchStatusRequest.md), options?: [TransportRequestOptionsWithOutMeta](./TransportRequestOptionsWithOutMeta.md)): Promise<[AsyncSearchStatusResponse](./AsyncSearchStatusResponse.md)>; Get the async search status. Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to: * The user or API key that submitted the original async search request. * Users that have the monitor cluster privilege or greater privileges.
status status(this: [That](./That.md), params: [AsyncSearchStatusRequest](./AsyncSearchStatusRequest.md), options?: [TransportRequestOptionsWithMeta](./TransportRequestOptionsWithMeta.md)): Promise<[TransportResult](./TransportResult.md)<[AsyncSearchStatusResponse](./AsyncSearchStatusResponse.md), unknown>>;  
status status(this: [That](./That.md), params: [AsyncSearchStatusRequest](./AsyncSearchStatusRequest.md), options?: [TransportRequestOptions](./TransportRequestOptions.md)): Promise<[AsyncSearchStatusResponse](./AsyncSearchStatusResponse.md)>;  
submit submit<TDocument = unknown, TAggregations = Record<[AggregateName](./AggregateName.md), [AggregationsAggregate](./AggregationsAggregate.md)>>(this: [That](./That.md), params?: [AsyncSearchSubmitRequest](./AsyncSearchSubmitRequest.md), options?: [TransportRequestOptionsWithOutMeta](./TransportRequestOptionsWithOutMeta.md)): Promise<[AsyncSearchSubmitResponse](./AsyncSearchSubmitResponse.md)<TDocument, TAggregations>>; 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.
submit submit<TDocument = unknown, TAggregations = Record<[AggregateName](./AggregateName.md), [AggregationsAggregate](./AggregationsAggregate.md)>>(this: [That](./That.md), params?: [AsyncSearchSubmitRequest](./AsyncSearchSubmitRequest.md), options?: [TransportRequestOptionsWithMeta](./TransportRequestOptionsWithMeta.md)): Promise<[TransportResult](./TransportResult.md)<[AsyncSearchSubmitResponse](./AsyncSearchSubmitResponse.md)<TDocument, TAggregations>, unknown>>;  
submit submit<TDocument = unknown, TAggregations = Record<[AggregateName](./AggregateName.md), [AggregationsAggregate](./AggregationsAggregate.md)>>(this: [That](./That.md), params?: [AsyncSearchSubmitRequest](./AsyncSearchSubmitRequest.md), options?: [TransportRequestOptions](./TransportRequestOptions.md)): Promise<[AsyncSearchSubmitResponse](./AsyncSearchSubmitResponse.md)<TDocument, TAggregations>>;