From 9cbcf4e6960203de0430e7b43c3c948c93563c7c Mon Sep 17 00:00:00 2001 From: xinhuitian Date: Thu, 1 Feb 2024 15:15:53 +0800 Subject: [PATCH 1/3] make HNSW::search use efSearch from params --- faiss/impl/HNSW.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faiss/impl/HNSW.cpp b/faiss/impl/HNSW.cpp index fb4de67899..4c1f703f59 100644 --- a/faiss/impl/HNSW.cpp +++ b/faiss/impl/HNSW.cpp @@ -829,7 +829,7 @@ HNSWStats HNSW::search( greedy_update_nearest(*this, qdis, level, nearest, d_nearest); } - int ef = std::max(efSearch, k); + int ef = std::max(params ? params->efSearch : efSearch, k); if (search_bounded_queue) { // this is the most common branch MinimaxHeap candidates(ef); From a168cb26355ed604392a0087d11e6ee5c43db6bd Mon Sep 17 00:00:00 2001 From: xinhuitian Date: Thu, 1 Feb 2024 15:21:59 +0800 Subject: [PATCH 2/3] rm dup spaces --- faiss/impl/HNSW.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faiss/impl/HNSW.cpp b/faiss/impl/HNSW.cpp index 4c1f703f59..a9fb9daf5b 100644 --- a/faiss/impl/HNSW.cpp +++ b/faiss/impl/HNSW.cpp @@ -829,7 +829,7 @@ HNSWStats HNSW::search( greedy_update_nearest(*this, qdis, level, nearest, d_nearest); } - int ef = std::max(params ? params->efSearch : efSearch, k); + int ef = std::max(params ? params->efSearch : efSearch, k); if (search_bounded_queue) { // this is the most common branch MinimaxHeap candidates(ef); From 9532272ced41b63c1eb9dc9d72ee2606418b417c Mon Sep 17 00:00:00 2001 From: tianxinhui Date: Thu, 1 Feb 2024 15:35:50 +0800 Subject: [PATCH 3/3] test