new: [data] ranked set by cpe name

This commit is contained in:
Alexandre Dulaunoy 2021-09-16 07:33:37 +02:00
parent 6baaad6f82
commit 109466e062
Signed by: adulau
GPG key ID: 09E2CD4944E6CBCD

View file

@ -65,6 +65,7 @@ def insert( word=None, cpe=None):
return False
rdb.sadd('w:{}'.format(word), cpe)
rdb.zadd('s:{}'.format(word), {cpe: 1}, incr=True)
rdb.zadd('rank:cpe', {cpe: 1}, incr=True)
cpe_path = '../data/official-cpe-dictionary_v2.3.xml'