From 109466e062daf4caa1c8d052108d0d82ad823a44 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Thu, 16 Sep 2021 07:33:37 +0200 Subject: [PATCH] new: [data] ranked set by cpe name --- bin/import.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/import.py b/bin/import.py index 2ba2b79..766518f 100644 --- a/bin/import.py +++ b/bin/import.py @@ -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'