Merge pull request #1 from Rafiot/master

Add counter on fields
This commit is contained in:
Alexandre Dulaunoy 2016-01-23 12:21:48 +01:00
commit 5ca0a28b9c

View file

@ -25,6 +25,7 @@ if args.f is not None:
for element in elements: for element in elements:
try: try:
r.sadd('e:'+fields[i], element) r.sadd('e:'+fields[i], element)
r.zincrby('t:'+fields[i], element)
# #
ehash = hashlib.md5() ehash = hashlib.md5()
ehash.update(element.encode('utf-8')) ehash.update(element.encode('utf-8'))