소스 검색

Search for the term itself as well as its completion

Daoud Clarke 3 년 전
부모
커밋
b99d9d1c6a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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