From bb049ee7142964be2cfed491cd75ffbf3ea22f88 Mon Sep 17 00:00:00 2001 From: PSeitz Date: Tue, 28 Jul 2026 09:29:06 +0200 Subject: [PATCH] default REUSE_AGG_BENCH_INDEX to true --- benches/agg_bench.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/benches/agg_bench.rs b/benches/agg_bench.rs index 590ef4e73..6cef2d8f0 100644 --- a/benches/agg_bench.rs +++ b/benches/agg_bench.rs @@ -765,7 +765,9 @@ fn get_collector(agg_req: Aggregations) -> AggregationCollector { fn get_test_index_bench(cardinality: Cardinality) -> tantivy::Result { // Flag to reuse an on-disk index across runs. The generated data differs per cardinality, so // the path must include the cardinality — otherwise one cardinality reuses another's index. - let reuse_index = std::env::var("REUSE_AGG_BENCH_INDEX").is_ok(); + let reuse_index = std::env::var("REUSE_AGG_BENCH_INDEX") + .map(|v| v == "true") + .unwrap_or(true); let index_dir = format!("agg_bench/{cardinality:?}"); if reuse_index && std::path::Path::new(&index_dir).exists() { return Index::open_in_dir(&index_dir);