diff options
author | Arne Juul <arnej@yahooinc.com> | 2023-04-19 09:41:47 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2023-04-19 09:43:08 +0000 |
commit | 3880d66a21f151e97ac6fb892aa56909591e830e (patch) | |
tree | 2f4b4fb1415a7e1bab5556db550ab8bc871788a6 /ann_benchmark | |
parent | 4f542728c8f13882470b7bdc55fe9909fd2ffe81 (diff) |
add mimimal version of BoundDistanceFunction
Diffstat (limited to 'ann_benchmark')
-rw-r--r-- | ann_benchmark/src/vespa/ann_benchmark/vespa_ann_benchmark.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ann_benchmark/src/vespa/ann_benchmark/vespa_ann_benchmark.cpp b/ann_benchmark/src/vespa/ann_benchmark/vespa_ann_benchmark.cpp index fe7fd9d25fb..778e175db25 100644 --- a/ann_benchmark/src/vespa/ann_benchmark/vespa_ann_benchmark.cpp +++ b/ann_benchmark/src/vespa/ann_benchmark/vespa_ann_benchmark.cpp @@ -207,7 +207,8 @@ HnswIndex::find_top_k(uint32_t k, const std::vector<float>& value, uint32_t expl TopKResult result; std::vector<float> normalized_value; auto typed_cells = get_typed_cells(value, normalized_value); - auto raw_result = _nearest_neighbor_index->find_top_k(k, typed_cells, explore_k, std::numeric_limits<double>::max()); + auto df = _nearest_neighbor_index->distance_function_factory().forQueryVector(typed_cells); + auto raw_result = _nearest_neighbor_index->find_top_k(k, *df, explore_k, std::numeric_limits<double>::max()); result.reserve(raw_result.size()); switch (_hnsw_index_params.distance_metric()) { case DistanceMetric::Euclidean: |