kayzhu/LSHash

lshash use redis

Opened this issue · 2 comments

lshash use redis

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

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