From 80faafdfc762919a5ce6379d6f2081bb35d8fc33 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Wed, 3 Jun 2020 11:58:16 -0400 Subject: [PATCH] [DOCS] Add clear scroll API reference docs (#57367) (#57611) --- docs/reference/search.asciidoc | 2 + .../search/clear-scroll-api.asciidoc | 86 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 docs/reference/search/clear-scroll-api.asciidoc diff --git a/docs/reference/search.asciidoc b/docs/reference/search.asciidoc index dfb302e03da..b2e5c50f117 100644 --- a/docs/reference/search.asciidoc +++ b/docs/reference/search.asciidoc @@ -158,6 +158,8 @@ include::search/async-search.asciidoc[] include::search/scroll-api.asciidoc[] +include::search/clear-scroll-api.asciidoc[] + include::search/search-template.asciidoc[] include::search/search-shards.asciidoc[] diff --git a/docs/reference/search/clear-scroll-api.asciidoc b/docs/reference/search/clear-scroll-api.asciidoc new file mode 100644 index 00000000000..e09d8a097a4 --- /dev/null +++ b/docs/reference/search/clear-scroll-api.asciidoc @@ -0,0 +1,86 @@ +[[clear-scroll-api]] +=== Clear scroll API +++++ +Clear scroll +++++ + +Clears the search context and results for a +<>. + +//// +[source,console] +-------------------------------------------------- +GET /_search?scroll=1m +{ + "size": 1, + "query": { + "match_all": {} + } +} +-------------------------------------------------- +// TEST[setup:twitter] +//// + +[source,console] +-------------------------------------------------- +DELETE /_search/scroll +{ + "scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==" +} +-------------------------------------------------- +// TEST[continued] +// TEST[s/DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==/$body._scroll_id/] + +[[clear-scroll-api-request]] +==== {api-request-title} + +`DELETE /_search/scroll/` +deprecated:[7.0.0] + +`DELETE /_search/scroll` + +[[clear-scroll-api-path-params]] +==== {api-path-parms-title} + +``:: +deprecated:[7.0.0] +(Optional, string) +Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. ++ +IMPORTANT: Scroll IDs can be long. We recommend only specifying +scroll IDs using the <>. + +[[clear-scroll-api-query-params]] +==== {api-query-parms-title} + +`scroll_id`:: +deprecated:[7.0.0] +(Optional, string) +Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. ++ +IMPORTANT: Scroll IDs can be long. We recommend only specifying +scroll IDs using the <>. + +[role="child_attributes"] +[[clear-scroll-api-request-body]] +==== {api-request-body-title} + +[[clear-scroll-api-scroll-id-param]] +`scroll_id`:: +(Required, string or array of strings) +Scroll IDs to clear. To clear all scroll IDs, use `_all`. + +[role="child_attributes"] +[[clear-scroll-api-response-body]] +==== {api-response-body-title} + +`succeeded`:: +(boolean) +If `true`, the request succeeded. This does not indicate whether any scrolling +search requests were cleared. + +`num_freed`:: +(integer) +Number of scrolling search requests cleared. \ No newline at end of file