clearcache.asciidoc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. [[indices-clearcache]]
  2. == Clear Cache
  3. The clear cache API allows to clear either all caches or specific cached
  4. associated with one or more indices.
  5. [source,js]
  6. --------------------------------------------------
  7. POST /twitter/_cache/clear
  8. --------------------------------------------------
  9. // CONSOLE
  10. // TEST[setup:twitter]
  11. The API, by default, will clear all caches. Specific caches can be cleaned
  12. explicitly by setting `query`, `fielddata` or `request`.
  13. All caches relating to a specific field(s) can also be cleared by
  14. specifying `fields` parameter with a comma delimited list of the
  15. relevant fields. Note that the provided names must refer to concrete
  16. fields -- objects and field aliases are not supported.
  17. [float]
  18. === Multi Index
  19. The clear cache API can be applied to more than one index with a single
  20. call, or even on `_all` the indices.
  21. [source,js]
  22. --------------------------------------------------
  23. POST /kimchy,elasticsearch/_cache/clear
  24. POST /_cache/clear
  25. --------------------------------------------------
  26. // CONSOLE
  27. // TEST[s/^/PUT kimchy\nPUT elasticsearch\n/]