summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp')
-rw-r--r--searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp b/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp
index 7fbfe19b42b..34085aad112 100644
--- a/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp
+++ b/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp
@@ -723,8 +723,11 @@ TYPED_TEST(HnswIndexTest, hnsw_graph_is_compacted)
// Forced compaction to move things around
CompactionSpec compaction_spec(true, false);
CompactionStrategy compaction_strategy;
- this->index->compact_link_arrays(compaction_spec, compaction_strategy);
- this->index->compact_level_arrays(compaction_spec, compaction_strategy);
+ auto& graph = this->index->get_graph();
+ graph.links_store.set_compaction_spec(compaction_spec);
+ graph.levels_store.set_compaction_spec(compaction_spec);
+ this->index->compact_link_arrays(compaction_strategy);
+ this->index->compact_level_arrays(compaction_strategy);
this->commit();
this->index->update_stat(compaction_strategy);
mem_2 = this->commit_and_update_stat();