From 443d667478fddf1e13f2e06b1da4e1ec3a9fe716 Mon Sep 17 00:00:00 2001 From: Yury Malkov Date: Fri, 15 Apr 2022 19:58:29 -0700 Subject: [PATCH 1/2] Update README.md Add information about the patent --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 503d75c2..9bcb6775 100644 --- a/README.md +++ b/README.md @@ -317,7 +317,8 @@ To run test **with** updates (from `build` directory) - Visual search engine for 1M amazon products (MXNet + HNSW): [website](https://thomasdelteil.github.io/VisualSearch_MXNet/), [code](https://github.com/ThomasDelteil/VisualSearch_MXNet), demo by [@ThomasDelteil](https://github.com/ThomasDelteil) ### References - +HNSW paper: +``` @article{malkov2018efficient, title={Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs}, author={Malkov, Yu A and Yashunin, Dmitry A}, @@ -328,3 +329,6 @@ To run test **with** updates (from `build` directory) year={2018}, publisher={IEEE} } +``` + +The update algorithm supported in this repository is to be published in "Dynamic Updates For HNSW, Hierarchical Navigable Small World Graphs" US Patent 15/929,802 by Apoorv Sharma, Abhishek Tayal and Yury Malkov. From f3532c847a13a4e588700ac0e5217b06ca1fea13 Mon Sep 17 00:00:00 2001 From: Bong Mo Kim Date: Tue, 7 Jun 2022 11:15:33 +0900 Subject: [PATCH 2/2] Update bruteforce.h - bruteforce.h : removePoint bug fix --- hnswlib/bruteforce.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hnswlib/bruteforce.h b/hnswlib/bruteforce.h index 24260400..6074c5f9 100644 --- a/hnswlib/bruteforce.h +++ b/hnswlib/bruteforce.h @@ -78,7 +78,8 @@ namespace hnswlib { dict_external_to_internal.erase(cur_external); labeltype label=*((labeltype*)(data_ + size_per_element_ * (cur_element_count-1) + data_size_)); - dict_external_to_internal[label]=cur_c; + if (cur_external != label) + dict_external_to_internal[label]=cur_c; memcpy(data_ + size_per_element_ * cur_c, data_ + size_per_element_ * (cur_element_count-1), data_size_+sizeof(labeltype));