mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 20:04:15 +02:00
[wgem] begin: reading from index
This commit is contained in:
@@ -40,16 +40,15 @@ class SearchIndexGenerator:
|
||||
name = sug.get('name')
|
||||
|
||||
if name:
|
||||
split_name = name.split(' ')
|
||||
split_name = name.lower().strip().split(' ')
|
||||
single_name = ''.join(split_name)
|
||||
|
||||
for word in (*split_name, single_name):
|
||||
word_key = word.lower().strip()
|
||||
mapped = index.get(word_key)
|
||||
mapped = index.get(word)
|
||||
|
||||
if not mapped:
|
||||
mapped = set()
|
||||
index[word_key] = mapped
|
||||
index[word] = mapped
|
||||
|
||||
mapped.add(key)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user