-
Notifications
You must be signed in to change notification settings - Fork 710
Does hnsw support adding items one by one in real-time? #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@willard-yuan Yes, the binding supports adding elements one by one, and should work in parallel with python threads. At the moment you need to add a dummy dimension for data and labels (i.e. call np.expand_dims(..,axis=0) on your vector and labels before passing them), as binding currently expects the input to be a matrix. |
@yurymalkov Thank you for your reply. I plan to use hnsw for face retrieval. |
Hi @yurymalkov, thank you for the your great work as well,
|
Hi @lzuwei
The good news is that the index time and indexing memory consumption are way better than in the nmslib, especially compared to post='2' case (the improvement in this case is ~3-4X). |
how to use "string" as label in "add_items" ? |
@danieloliveirabrazil You can use a map <int, string> to record the label when an item is added to the index. |
when we can use Hamming distance? sorry! I'm english language is not well. |
if hnsw use Squared L2 distance and lsh use Hamming distance ,who will be faster ? sorry! I'm Chinese student! |
Hi @394781865, |
@394781865 yes, NMSLIB supports the hamming distance, you can use the following example https://github.com/nmslib/nmslib/blob/master/python_bindings/tests/legacy_test.py#L159
|
Add length tracking for normalized vectors
Hi yurymalkov,
Thank you for your great work, and the performance shows in the paper is interesting. The python bindings shows the index can be built with incremental construction. Does the hnsw support adding items one by one? i.e. adding items one by one in real-time to the index dynamically.
The text was updated successfully, but these errors were encountered: