kayzhu / LSHash

A fast Python implementation of locality sensitive hashing.
MIT License
660 stars 158 forks source link

How to delete on index item? #6

Open dvstream opened 9 years ago

dvstream commented 9 years ago

How to delete on index item? Not only add a item to index, but how to delete one?

rdooley commented 9 years ago

You should be able to iterate the the hash tables and remove the hashed value of the item. See how things are added below: https://github.com/kayzh/LSHash/blob/master/lshash/lshash.py#L203 So you would need to get the hash for the item (using the _hash method), then remove the hashed value from any hash tables.