summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/tensor/hnsw_index
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-11-22 13:20:02 +0100
committerTor Egge <Tor.Egge@online.no>2022-11-22 13:20:02 +0100
commitab79bbac295e6f9d3fa9d6d069c6163f2085e05a (patch)
treefd2752205b8d818ea1b36ce72181ca50119b866a /searchlib/src/tests/tensor/hnsw_index
parent85d1e066e03030de91558746864dfd84ecd2f1bc (diff)
Pass id mapper to HnswIndexLoader.
Diffstat (limited to 'searchlib/src/tests/tensor/hnsw_index')
-rw-r--r--searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp5
1 files changed, 2 insertions, 3 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 13caad8b6d6..bea371c78a8 100644
--- a/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp
+++ b/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp
@@ -234,10 +234,9 @@ public:
void load_index(std::vector<char> data) {
auto& graph = index->get_graph();
- HnswIndexLoader<VectorBufferReader, IndexType::index_type> loader(graph, std::make_unique<VectorBufferReader>(data));
- while (loader.load_next()) {}
auto& id_mapping = index->get_id_mapping();
- id_mapping.on_load(graph.node_refs.make_read_view(graph.node_refs.size()));
+ HnswIndexLoader<VectorBufferReader, IndexType::index_type> loader(graph, id_mapping, std::make_unique<VectorBufferReader>(data));
+ while (loader.load_next()) {}
}
static constexpr bool is_single = std::is_same_v<IndexType, HnswIndex<HnswIndexType::SINGLE>>;