Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ setup:
{ "index": {"_id": "3"}}
{ "num": [3, 4] }

- do:
indices.refresh: {}
---
"Filters intersections":

Expand Down Expand Up @@ -69,7 +67,17 @@ setup:
- skip:
version: " - 7.8.99"
reason: fixed in 7.9.0

- do:
indices.create:
index: lookup
body:
settings:
number_of_shards: 1
number_of_replicas: 0
mappings:
properties:
num:
type: long
- do:
bulk:
index: lookup
Expand All @@ -81,6 +89,7 @@ setup:
{ "num": [2] }
{ "index": {"_id": 4} }
{ "num": [4] }

- do:
search:
index: test
Expand Down Expand Up @@ -124,3 +133,45 @@ setup:

- match: { aggregations.conns.buckets.3.doc_count: 1 }
- match: { aggregations.conns.buckets.3.key: "4" }

- do:
indices.stats: { index: test, metric: request_cache}
- match: { _shards.total: 1 }
- match: { _all.total.request_cache.hit_count: 0 }
- match: { _all.total.request_cache.miss_count: 1 }
- is_true: indices.test

# The second request should hit the cache
- do:
search:
index: test
body:
size: 0
aggs:
conns:
adjacency_matrix:
filters:
1:
terms:
num:
index: lookup
id: "1"
path: num
2:
terms:
num:
index: lookup
id: "2"
path: num
4:
terms:
num:
index: lookup
id: "4"
path: num
- do:
indices.stats: { index: test, metric: request_cache}
- match: { _shards.total: 1 }
- match: { _all.total.request_cache.hit_count: 1 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That game me a bit of a pause. Took me a bit to realize that you are asking for one index only in stats. I think it would have been clearer if it was indices.test.total.request_cache.hit_coun instead of _all.total.....

- match: { _all.total.request_cache.miss_count: 1 }
- is_true: indices.test