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