clear-scroll-api.asciidoc 2.1 KB

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