aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/tensor
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2023-01-12 14:23:16 +0100
committerTor Egge <Tor.Egge@online.no>2023-01-12 14:23:16 +0100
commit0ef72239262b0353a6625d638097bf1c57bf051f (patch)
tree433a31639984773ff484ca2184769dccc4bb636d /searchlib/src/tests/tensor
parentca9c0bb23d927af20f4c40cc71679c22c7cb08e5 (diff)
Add compaction spec to array store.
Diffstat (limited to 'searchlib/src/tests/tensor')
-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();