Skip to content

[Search service] Add async search strategy #48811

@lukasolson

Description

@lukasolson

Background

The folks on the Elasticsearch team are currently implementing the building blocks necessary for async search. Compared to traditional synchronous search which consists of a single request, this will consist of multiple requests to Elasticsearch:

  1. To initiate the search
  2. To poll the status on the search (and potentially receive partial results)
  3. (Conditionally) To cancel the search

We need to build out the internals in Kibana to support these types of search requests.

Implementation

As of #46742, we now have the groundwork necessary for creating different search strategies. This issue is specifically about creating a partial (or abstract) asynchronous search strategy that can be used in other search strategies.

The async search strategy will be a client-side strategy (similar to the sync search strategy) that is responsible for the following:

  1. Making an initial call to the internal search endpoint with the search parameters
  2. Retrieving an ID in the response
  3. Polling the internal search endpoint with the given ID
  4. Returning an observable which emits on each response and completes when the response dictates (i.e. percentComplete returns 100)
  5. Sending a cancellation request if the abortSignal is aborted

Metadata

Metadata

Assignees

Labels

Feature:SearchQuerying infrastructure in Kibana

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions