ekzhu / datasketch

MinHash, LSH, LSH Forest, Weighted MinHash, HyperLogLog, HyperLogLog++, LSH Ensemble and HNSW
https://ekzhu.github.io/datasketch
MIT License
2.59k stars 296 forks source link

How to change Redis storage configuration in an existing MinHash LSH #39

Closed rickyqiao closed 6 years ago

rickyqiao commented 7 years ago

Hey,nice to meet you! In your code, there is some code to create lsh like: lsh = MinHashLSH(threshold=0.91, num_perm=128, storage_config={ 'type': 'redis', 'redis': {'host': '10.8.35.7', 'port': 6379, 'db': 9}, 'name': 'abcdefghij'}, prepickle=True)

If such lsh had create,and some data had already add into it, how can I change this IP?

ekzhu commented 6 years ago

Currently there is no public method to do this. I think you would have to recreate the LSH with the new configuration.

Alternatively you can work around this by modifying the storage of the LSH object manually.