|
| 1 | +[[clear-scroll-api]] |
| 2 | +=== Clear scroll API |
| 3 | +++++ |
| 4 | +<titleabbrev>Clear scroll</titleabbrev> |
| 5 | +++++ |
| 6 | + |
| 7 | +Clears the search context and results for a |
| 8 | +<<request-body-search-scroll,scrolling search>>. |
| 9 | + |
| 10 | +//// |
| 11 | +[source,console] |
| 12 | +-------------------------------------------------- |
| 13 | +GET /_search?scroll=1m |
| 14 | +{ |
| 15 | + "size": 1, |
| 16 | + "query": { |
| 17 | + "match_all": {} |
| 18 | + } |
| 19 | +} |
| 20 | +-------------------------------------------------- |
| 21 | +// TEST[setup:twitter] |
| 22 | +//// |
| 23 | + |
| 24 | +[source,console] |
| 25 | +-------------------------------------------------- |
| 26 | +DELETE /_search/scroll |
| 27 | +{ |
| 28 | + "scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==" |
| 29 | +} |
| 30 | +-------------------------------------------------- |
| 31 | +// TEST[continued] |
| 32 | +// TEST[s/DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==/$body._scroll_id/] |
| 33 | + |
| 34 | +[[clear-scroll-api-request]] |
| 35 | +==== {api-request-title} |
| 36 | + |
| 37 | +`DELETE /_search/scroll/<scroll_id>` |
| 38 | +deprecated:[7.0.0] |
| 39 | + |
| 40 | +`DELETE /_search/scroll` |
| 41 | + |
| 42 | +[[clear-scroll-api-path-params]] |
| 43 | +==== {api-path-parms-title} |
| 44 | + |
| 45 | +`<scroll_id>`:: |
| 46 | +deprecated:[7.0.0] |
| 47 | +(Optional, string) |
| 48 | +Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. |
| 49 | ++ |
| 50 | +IMPORTANT: Scroll IDs can be long. We recommend only specifying |
| 51 | +scroll IDs using the <<clear-scroll-api-scroll-id-param,`scroll_id` request body |
| 52 | +parameter>>. |
| 53 | + |
| 54 | +[[clear-scroll-api-query-params]] |
| 55 | +==== {api-query-parms-title} |
| 56 | + |
| 57 | +`scroll_id`:: |
| 58 | +deprecated:[7.0.0] |
| 59 | +(Optional, string) |
| 60 | +Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. |
| 61 | ++ |
| 62 | +IMPORTANT: Scroll IDs can be long. We recommend only specifying |
| 63 | +scroll IDs using the <<clear-scroll-api-scroll-id-param,`scroll_id` request body |
| 64 | +parameter>>. |
| 65 | + |
| 66 | +[role="child_attributes"] |
| 67 | +[[clear-scroll-api-request-body]] |
| 68 | +==== {api-request-body-title} |
| 69 | + |
| 70 | +[[clear-scroll-api-scroll-id-param]] |
| 71 | +`scroll_id`:: |
| 72 | +(Required, string or array of strings) |
| 73 | +Scroll IDs to clear. To clear all scroll IDs, use `_all`. |
| 74 | + |
| 75 | +[role="child_attributes"] |
| 76 | +[[clear-scroll-api-response-body]] |
| 77 | +==== {api-response-body-title} |
| 78 | + |
| 79 | +`succeeded`:: |
| 80 | +(boolean) |
| 81 | +If `true`, the request succeeded. This does not indicate whether any scrolling |
| 82 | +search requests were cleared. |
| 83 | + |
| 84 | +`num_freed`:: |
| 85 | +(integer) |
| 86 | +Number of scrolling search requests cleared. |
0 commit comments