flush.asciidoc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. [[indices-flush]]
  2. == Flush
  3. The flush API allows to flush one or more indices through an API. The
  4. flush process of an index basically frees memory from the index by
  5. flushing data to the index storage and clearing the internal
  6. <<index-modules-translog,transaction log>>. By
  7. default, ElasticSearch uses memory heuristics in order to automatically
  8. trigger flush operations as required in order to clear memory.
  9. [source,js]
  10. --------------------------------------------------
  11. $ curl -XPOST 'http://localhost:9200/twitter/_flush'
  12. --------------------------------------------------
  13. [float]
  14. === Request Parameters
  15. The flush API accepts the following request parameters:
  16. [cols="<,<",options="header",]
  17. |=======================================================================
  18. |Name |Description
  19. |`refresh` |Should a refresh be performed after the flush. Defaults to
  20. `false`.
  21. |=======================================================================
  22. [float]
  23. === Multi Index
  24. The flush API can be applied to more than one index with a single call,
  25. or even on `_all` the indices.
  26. [source,js]
  27. --------------------------------------------------
  28. $ curl -XPOST 'http://localhost:9200/kimchy,elasticsearch/_flush'
  29. $ curl -XPOST 'http://localhost:9200/_flush'
  30. --------------------------------------------------