Skip to content

Commit

Permalink
Merge pull request #166 from hanayik/master
Browse files Browse the repository at this point in the history
  • Loading branch information
pjvandehaar authored Feb 3, 2024
2 parents 025c76d + 66396d2 commit fe11eaf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pheweb/serve/autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def autocomplete(self, query:str) -> List[Dict[str,str]]:
query = query.strip()
result = []
for autocompleter in self._autocompleters:
result = list(itertools.islice(autocompleter(query), 0, 10))
if result: break
current_result = list(itertools.islice(autocompleter(query), 0, 1000))
if current_result:
result.extend(current_result)
return result

def get_best_completion(self, query:str) -> Optional[Dict[str,str]]:
Expand Down

0 comments on commit fe11eaf

Please sign in to comment.