From e9641f99c55d2890f12c44d03348bd1285758762 Mon Sep 17 00:00:00 2001 From: Pascal Seitz Date: Mon, 20 Apr 2026 20:18:31 +0200 Subject: [PATCH] add nested term benchmark --- benches/agg_bench.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/benches/agg_bench.rs b/benches/agg_bench.rs index 89a41732d..28009fa3f 100644 --- a/benches/agg_bench.rs +++ b/benches/agg_bench.rs @@ -63,6 +63,8 @@ fn bench_agg(mut group: InputGroup) { register!(group, terms_all_unique_with_avg_sub_agg); register!(group, terms_many_with_avg_sub_agg); register!(group, terms_status_with_avg_sub_agg); + register!(group, terms_status_with_terms_zipf_1000_sub_agg); + register!(group, terms_zipf_1000_with_terms_status_sub_agg); register!(group, terms_status_with_histogram); register!(group, terms_zipf_1000); register!(group, terms_zipf_1000_with_histogram); @@ -270,6 +272,30 @@ fn terms_all_unique_with_avg_sub_agg(index: &Index) { }); execute_agg(index, agg_req); } +fn terms_status_with_terms_zipf_1000_sub_agg(index: &Index) { + let agg_req = json!({ + "my_texts": { + "terms": { "field": "text_few_terms_status" }, + "aggs": { + "nested_terms": { "terms": { "field": "text_1000_terms_zipf" } } + } + } + }); + execute_agg(index, agg_req); +} + +fn terms_zipf_1000_with_terms_status_sub_agg(index: &Index) { + let agg_req = json!({ + "my_texts": { + "terms": { "field": "text_1000_terms_zipf" }, + "aggs": { + "nested_terms": { "terms": { "field": "text_few_terms_status" } } + } + } + }); + execute_agg(index, agg_req); +} + fn terms_status_with_histogram(index: &Index) { let agg_req = json!({ "my_texts": {