2013-08-28 19:24:34 -04:00
|
|
|
[[index-modules-cache]]
|
|
|
|
== Cache
|
|
|
|
|
|
|
|
There are different caching inner modules associated with an index. They
|
|
|
|
include `filter` and others.
|
|
|
|
|
|
|
|
[float]
|
2013-09-25 12:17:40 -04:00
|
|
|
[[filter]]
|
2013-08-28 19:24:34 -04:00
|
|
|
=== Filter Cache
|
|
|
|
|
|
|
|
The filter cache is responsible for caching the results of filters (used
|
|
|
|
in the query). The default implementation of a filter cache (and the one
|
|
|
|
recommended to use in almost all cases) is the `node` filter cache type.
|
|
|
|
|
|
|
|
[float]
|
2013-09-25 12:17:40 -04:00
|
|
|
[[node-filter]]
|
2013-08-28 19:24:34 -04:00
|
|
|
==== Node Filter Cache
|
|
|
|
|
|
|
|
The `node` filter cache may be configured to use either a percentage of
|
2014-11-29 18:08:36 -05:00
|
|
|
the total memory allocated to the process or a specific amount of
|
2013-08-28 19:24:34 -04:00
|
|
|
memory. All shards present on a node share a single node cache (thats
|
2014-04-02 18:07:00 -04:00
|
|
|
why its called `node`). The cache implements an LRU eviction policy:
|
2013-08-28 19:24:34 -04:00
|
|
|
when a cache becomes full, the least recently used data is evicted to
|
|
|
|
make way for new data.
|
|
|
|
|
|
|
|
The setting that allows one to control the memory size for the filter
|
2014-05-06 04:13:05 -04:00
|
|
|
cache is `indices.cache.filter.size`, which defaults to `10%`. *Note*,
|
2013-08-28 19:24:34 -04:00
|
|
|
this is *not* an index level setting but a node level setting (can be
|
|
|
|
configured in the node configuration).
|
|
|
|
|
|
|
|
`indices.cache.filter.size` can accept either a percentage value, like
|
|
|
|
`30%`, or an exact value, like `512mb`.
|
|
|
|
|