Skip to content

Commit

Permalink
forgot one thing to make it py-redis 2 compatible while making it eas…
Browse files Browse the repository at this point in the history
…y to switch to py-redis 3
  • Loading branch information
ara818 committed Sep 25, 2019
1 parent 7332627 commit ca9881e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autocompleter/base.py
Expand Up @@ -305,7 +305,7 @@ def store(self, delete_old=True):
word_prefix += char
# Store prefix to obj ID mapping, with score
key = PREFIX_BASE_NAME % (provider_name, word_prefix,)
pipe.zadd(key, {obj_id: score})
pipe.zadd(key, **{obj_id: score})
# Store autocompleter to prefix mapping so we know all prefixes
# of an autocompleter
key = PREFIX_SET_BASE_NAME % (provider_name,)
Expand All @@ -320,7 +320,7 @@ def store(self, delete_old=True):
continue
# Store exact term to obj ID mapping, with score
key = EXACT_BASE_NAME % (provider_name, norm_term,)
pipe.zadd(key, {obj_id: score})
pipe.zadd(key, **{obj_id: score})

# Store autocompleter to exact term mapping so we know all exact terms
# of an autocompleter
Expand All @@ -329,7 +329,7 @@ def store(self, delete_old=True):

for facet in facet_dicts:
key = FACET_SET_BASE_NAME % (provider_name, facet['key'], facet['value'],)
pipe.zadd(key, {obj_id: score})
pipe.zadd(key, **{obj_id: score})

# Map provider's obj_id -> data payload
key = AUTO_BASE_NAME % (provider_name,)
Expand Down

0 comments on commit ca9881e

Please sign in to comment.