pixelogik / NearPy

Python framework for fast (approximated) nearest neighbour search in large, high-dimensional data sets using different locality-sensitive hashes.
MIT License
763 stars 151 forks source link

Use set instead of list in redis storage to prevent duplicate vectors #45

Closed adityapatadia closed 8 years ago

adityapatadia commented 8 years ago

I suggest using sadd instead of rpush at https://github.com/pixelogik/NearPy/blob/master/nearpy/storage/storage_redis.py#L87

Also we should use smembers instead of lrange https://github.com/pixelogik/NearPy/blob/master/nearpy/storage/storage_redis.py#L94

This will prevent duplicate vectors.

adityapatadia commented 8 years ago

Ignore the issue. I think it is not valid.