Skip to content

Conversation

@mayya-sharipova
Copy link
Contributor

Introduce async search status API

GET /_async_search/status/

The API is restricted to the monitoring_user role.

For a running async search, the response is:

{
  "id" : <id>,
  "is_running" : true,
  "is_partial" : true,
  "start_time_in_millis" : 1583945890986,
  "expiration_time_in_millis" : 1584377890986,
  "_shards" : {
      "total" : 562,
      "successful" : 188,
      "skipped" : 0,
      "failed" : 0
  }
}

For a completed async search, an additional
completion_status fields is added.

{
  "id" : <id>,
  "is_running" : false,
  "is_partial" : false,
  "start_time_in_millis" : 1583945890986,
  "expiration_time_in_millis" : 1584377890986,
  "_shards" : {
      "total" : 562,
      "successful" : 562,
      "skipped" : 0,
      "failed" : 0
  },
 "completion_status" : 200
}

Closes #57537
Backport for #62947

@mayya-sharipova mayya-sharipova added :Search/Search Search-related issues that do not fall into other categories backport v7.11.0 labels Nov 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Nov 3, 2020
Introduce async search status API

GET /_async_search/status/<id>

The API is restricted to the monitoring_user role.

For a running async search, the response is:

```js
{
  "id" : <id>,
  "is_running" : true,
  "is_partial" : true,
  "start_time_in_millis" : 1583945890986,
  "expiration_time_in_millis" : 1584377890986,
  "_shards" : {
      "total" : 562,
      "successful" : 188,
      "skipped" : 0,
      "failed" : 0
  }
}
```

For a completed async search, an additional
`completion_status` fields is added.

```js
{
  "id" : <id>,
  "is_running" : false,
  "is_partial" : false,
  "start_time_in_millis" : 1583945890986,
  "expiration_time_in_millis" : 1584377890986,
  "_shards" : {
      "total" : 562,
      "successful" : 562,
      "skipped" : 0,
      "failed" : 0
  },
 "completion_status" : 200
}
```

Closes elastic#57537
Backport for elastic#62947
@mayya-sharipova mayya-sharipova force-pushed the async-search-status-7.x branch from 000031b to 5adcdca Compare November 3, 2020 20:32
@mayya-sharipova mayya-sharipova merged commit ee08069 into elastic:7.x Nov 3, 2020
@mayya-sharipova mayya-sharipova deleted the async-search-status-7.x branch November 3, 2020 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants