pixelogik / NearPy

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

Revert "add Engine.store_many_vectors() for uploading to Redis using pipeline" #74

Closed pixelogik closed 6 years ago

pixelogik commented 6 years ago

@xieqihui I snap. Same case as in the Mongo pull request. You added a new method to the Redis storage class. All storage class should support the same methods, if possible. A user of the Engine class could use the store_many_vectors method, even when not using the Redis storage, which will crash. I would like to keep the usage of Engine as simple as possible.

My suggestion is: In Engine differentiate in store_many_vectors between the Redis case and others. If it is not a Redis storage, use the store_vector method in a loop so that it also works there.