clearcache.asciidoc 980 B

12345678910111213141516171819202122232425262728293031
  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. $ curl -XPOST 'http://localhost:9200/twitter/_cache/clear'
  8. --------------------------------------------------
  9. The API, by default, will clear all caches. Specific caches can be cleaned
  10. explicitly by setting `query`, `fielddata` or `request`.
  11. All caches relating to a specific field(s) can also be cleared by
  12. specifying `fields` parameter with a comma delimited list of the
  13. relevant fields.
  14. [float]
  15. === Multi Index
  16. The clear cache API can be applied to more than one index with a single
  17. call, or even on `_all` the indices.
  18. [source,js]
  19. --------------------------------------------------
  20. $ curl -XPOST 'http://localhost:9200/kimchy,elasticsearch/_cache/clear'
  21. $ curl -XPOST 'http://localhost:9200/_cache/clear'
  22. --------------------------------------------------