Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lshash use redis #21

Open
dontLoveBugs opened this issue Oct 30, 2017 · 2 comments
Open

lshash use redis #21

dontLoveBugs opened this issue Oct 30, 2017 · 2 comments

Comments

@dontLoveBugs
Copy link

No description provided.

@dontLoveBugs
Copy link
Author

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 dontLoveBugs changed the title lshash use lshash use redis Oct 30, 2017
@ziliangok
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants