Do a prepend instead of an append to generate search index. Allow reverse date order results display

This commit is contained in:
Grégory Soutadé 2012-12-22 09:34:21 +01:00
parent 839b935d47
commit 12b43ffbed
1 changed files with 1 additions and 1 deletions

View File

@ -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