Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Index methods:

* `set_num_threads(num_threads)` set the default number of cpu threads used during data insertion/querying.

* `get_items(ids)` - returns a numpy array (shape:`N*dim`) of vectors that have integer identifiers specified in `ids` numpy vector (shape:`N`).
* `get_items(ids)` - returns a numpy array (shape:`N*dim`) of vectors that have integer identifiers specified in `ids` numpy vector (shape:`N`). Note that for cosine similarity it currently returns **normalized** vectors.

* `get_ids_list()` - returns a list of all elements' ids.

Expand Down Expand Up @@ -197,6 +197,7 @@ https://github.com/dbaranchuk/ivf-hnsw
* Go implementation: https://github.com/Bithack/go-hnsw
* Python implementation (as a part of the clustering code by by Matteo Dell'Amico): https://github.com/matteodellamico/flexible-clustering
* Java implementation: https://github.com/jelmerk/hnswlib
* Java bindings using Java Native Access: https://github.com/stepstone-tech/hnswlib-jna
* .Net implementation: https://github.com/microsoft/HNSW.Net

### Contributing to the repository
Expand Down
4 changes: 2 additions & 2 deletions python_bindings/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ class Index {
return data;
}

std::vector<unsigned int> getIdsList() {
std::vector<hnswlib::labeltype> getIdsList() {

std::vector<unsigned int> ids;
std::vector<hnswlib::labeltype> ids;

for(auto kv : appr_alg->label_lookup_) {
ids.push_back(kv.first);
Expand Down