mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-24 07:18:11 +01:00
autocomplete ordering
This commit is contained in:
parent
05f20c19c3
commit
689b0db1a8
1 changed files with 1 additions and 3 deletions
|
|
@ -108,8 +108,6 @@ def query_index(ix, querystr):
|
|||
def autocomplete(ix, term, limit=10):
|
||||
with ix.reader() as reader:
|
||||
terms = []
|
||||
for t in reader.expand_prefix("content", term.lower()):
|
||||
for (score, t) in reader.most_distinctive_terms("content", limit, term.lower()):
|
||||
terms.append(t)
|
||||
if len(terms) >= limit:
|
||||
break
|
||||
return terms
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue