spotify / voyager

🛰️ An approximate nearest-neighbor search library for Python and Java with a focus on ease of use, simplicity, and deployability.
https://spotify.github.io/voyager/
Apache License 2.0
1.3k stars 53 forks source link

Add StringIndex support in Python/C++ #11

Open markkohdev opened 1 year ago

markkohdev commented 1 year ago

The java bindings currently support a StringIndex class which wraps the Index class but adds a mapping of strings to index integer IDs. This is a handy piece of functionality which would be beneficial and should be fairly straightforward to implement in the Python bindings

markkohdev commented 1 year ago

Additionally, we should support string index containment checking with this python StringIndex as well so that we can write things like

if "some-string-key" in my_index:
  # Do something
markkohdev commented 3 months ago

cc @Ibrokhimsadikov