LSHash icon indicating copy to clipboard operation
LSHash copied to clipboard

lshash use redis

Open dontLoveBugs opened this issue 7 years ago • 2 comments

dontLoveBugs avatar Oct 30 '17 13:10 dontLoveBugs

from lshash import LSHash lsh = LSHash(6, 8, storage_config={"redis":{"host":'localhost',"port":6379}}) lsh.index([1, 2, 3, 4, 5, 6, 7, 8]) lsh.index([2, 3, 4, 5, 6, 7, 8, 9]) lsh.index([10, 12, 99, 1, 5, 31, 2, 3]) print(lsh.query([1, 2, 3, 4, 5, 6, 7, 7])) image

dontLoveBugs avatar Oct 30 '17 13:10 dontLoveBugs

change tuples = json.loads(json_or_tuple)[0] to tuples = json.loads(json_or_tuple) in the source code

ziliangok avatar May 03 '18 03:05 ziliangok