Skip to content

Throw errors on search timeouts #27186

@markharwood

Description

@markharwood

Currently a search timeout will attempt to return partial results along with a timed_out:true flag in the response.
Sadly, today we expect most client applications will pay little attention to this timed_out flag and will present partial results to clients with no indication that the results are incomplete.

This issue proposes we fix this by allowing a new "hard" timeout type which will throw an error to the client application in the event of a timeout. This will require the following:

  • A new timeout_type:hard query parameter as part of search requests, as opposed to the default timeout_type:partial(these names are up for debate).
  • The default_timeout_type setting would be a new cluster-wide setting allowing admins to define a default policy when clients don't provide any choice on search requests.
  • A suitable HTTP response code will be needed for errors - 503 overloaded looks like it may be most appropriate?

Metadata

Metadata

Assignees

Labels

:Search/SearchSearch-related issues that do not fall into other categoriesdiscuss

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions