diff options
author | Arne Juul <arnej@yahooinc.com> | 2023-04-19 20:46:33 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2023-04-19 20:46:38 +0000 |
commit | 732e4c4be8bbc5a43e3adae5db222301e630bd8c (patch) | |
tree | 37926eda6dfa9bcbc87f4c96f74bf487ddc53ffe /searchlib/src/tests/tensor | |
parent | 3880d66a21f151e97ac6fb892aa56909591e830e (diff) |
follow-up after review
* add class comment on API declaration
* prefer snake_case for methods
* prefer reference
Diffstat (limited to 'searchlib/src/tests/tensor')
-rw-r--r-- | searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp | 6 |
1 files changed, 3 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 768157412f9..9f6216f5867 100644 --- a/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp +++ b/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp @@ -171,7 +171,7 @@ public: uint32_t explore_k = 100; vespalib::ArrayRef qv_ref(qv); vespalib::eval::TypedCells qv_cells(qv_ref); - auto df = index->distance_function_factory().forQueryVector(qv_cells); + auto df = index->distance_function_factory().for_query_vector(qv_cells); auto got_by_docid = (global_filter->is_active()) ? index->find_top_k_with_filter(k, *df, *global_filter, explore_k, 10000.0) : index->find_top_k(k, *df, explore_k, 10000.0); @@ -185,7 +185,7 @@ public: void expect_top_3(uint32_t docid, std::vector<uint32_t> exp_hits) { uint32_t k = 3; auto qv = vectors.get_vector(docid, 0); - auto df = index->distance_function_factory().forQueryVector(qv); + auto df = index->distance_function_factory().for_query_vector(qv); auto rv = index->top_k_candidates(*df, k, global_filter->ptr_if_active()).peek(); std::sort(rv.begin(), rv.end(), LesserDistance()); size_t idx = 0; @@ -206,7 +206,7 @@ public: } void check_with_distance_threshold(uint32_t docid) { auto qv = vectors.get_vector(docid, 0); - auto df = index->distance_function_factory().forQueryVector(qv); + auto df = index->distance_function_factory().for_query_vector(qv); uint32_t k = 3; auto rv = index->top_k_candidates(*df, k, global_filter->ptr_if_active()).peek(); std::sort(rv.begin(), rv.end(), LesserDistance()); |