Elasticsearch solves the persistence in different ways. The transaction log, translog, and the temporary storage in-memory buffer are used during index operations. Later, the data in the in-memory buffer will move to a new segment. Finally, segments will be flushed to the disk storage. A few APIs that manage the persistent stage of the indexed data are as follows:
- Clear Cache: When Elasticsearch determines that a bitset is likely to be reused in the future, it will be cached directly in memory and reuse it as needed. This API allows you to clear all caches or specific caches such as query, request, and field data for one or more indices.
The following is an example of clearing the query cache of the cf_view index:
The following is an example of clearing the shard request cache of the cf_view index:
The following is an example of clearing the field data cache...