Browse Source

Search for the term itself as well as its completion

Daoud Clarke 2 years ago
parent
commit
b99d9d1c6a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mwmbl/tinysearchengine/rank.py

+ 1 - 1
mwmbl/tinysearchengine/rank.py

@@ -138,7 +138,7 @@ class Ranker:
         terms = [x.lower() for x in q.replace('.', ' ').split()]
         is_complete = q.endswith(' ')
         if len(terms) > 0 and not is_complete:
-            retrieval_terms = terms[:-1] + self.completer.complete(terms[-1])
+            retrieval_terms = terms + self.completer.complete(terms[-1])
         else:
             retrieval_terms = terms