I've an index on which I've explicitly enabled request cache using the following settings:
curl -XPUT 'localhost:9200/index_one?pretty' -H 'Content-Type: application/json' -d'
{
"settings": {
"index.requests.cache.enable": "true"
},
"mappings": {
"type_one": {
"properties": {
"status": {
"type": "keyword"
}
}
}
}
}
'
I'm running this aggregation on it, which returns a successfully aggregated bucket.
curl -XGET 'localhost:9200/_search?&pretty' -H 'Content-Type: application/json' -d'
{
"aggs" : {
"availability" : {
"terms" : { "field" : "status" }
}
}
}
'
But my request cache is empty.
"request_cache" : {
"memory_size" : "0b",
"memory_size_in_bytes" : 0,
"evictions" : 0,
"hit_count" : 0,
"miss_count" : 0
}
According to this link here, request cache ought to be caching aggregations. https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-request-cache.html
I'm using elasticsearch version 6.1.1