opendistro-for-elasticsearch / sample-code

👋 Welcome to the Open Distro sample-code area. Share your great ideas and code samples with the Open Distro Community.
https://github.com/opendistro-for-elasticsearch/sample-code
Apache License 2.0
278 stars 81 forks source link

Support for Asynchronous Search #220

Closed Bukhtawar closed 3 years ago

Bukhtawar commented 3 years ago

Overview

Occasionally business would like to run queries on vast amount of data that can take very long to return results.

Asynchronous search makes it possible for users to run such queries without worrying about the query timing out. These queries run in the background, and users can track the progress, and retrieve results as they become available.

The asynchronous search API let you asynchronously execute a search request, monitor its progress, and retrieve partial results as they become available.

Key User Stories

RFC for asynchronous search :

RFC Asynchronous Search with Elasticsearch.pdf

Bukhtawar commented 3 years ago

Repo link : https://github.com/opendistro-for-elasticsearch/asynchronous-search/

massimolauri commented 3 years ago

This is my workaround for my use case:

create action group: curl -XPUT "https://elasticsearch-host:9200/_opendistro/_security/api/actiongroups/async_fix_action_group" -H 'Content-Type: application/json' -d'{ "allowed_actions": [ "indices:data/read/async_search/submit", "indices:data/read/async_search/submit", "indices:data/read/async_search/delete", "indices:data/read/async_search/delete", "indices:data/read/async_search/get", "indices:data/read/async_search/get*" ]}'

Add to role action group.