Do a prepend instead of an append to generate search index. Allow reverse date order results display
This commit is contained in:
parent
839b935d47
commit
12b43ffbed
|
@ -109,7 +109,7 @@ class Search:
|
|||
if not word in hashtable:
|
||||
hashtable[word] = []
|
||||
if not index in hashtable[word]:
|
||||
hashtable[word].append([index, word_weight])
|
||||
hashtable[word].insert(0, [index, word_weight])
|
||||
else:
|
||||
weight = hashtable[word][1]
|
||||
hashtable[word][1] = weight + word_weight
|
||||
|
|
Loading…
Reference in New Issue
Block a user