diff --git a/search.py b/search.py index cdad7c6..890ed94 100644 --- a/search.py +++ b/search.py @@ -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