mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 16:25:33 +01:00
code cleanup
This commit is contained in:
parent
5a84cc835a
commit
b44f8383e4
18 changed files with 208 additions and 101 deletions
|
|
@ -120,6 +120,7 @@ def query_page(ix, query, page):
|
|||
def autocomplete(ix, term, limit=10):
|
||||
with ix.reader() as reader:
|
||||
terms = []
|
||||
for (score, t) in reader.most_distinctive_terms("content", limit, term.lower()):
|
||||
for (score, t) in reader.most_distinctive_terms(
|
||||
"content", number=limit, prefix=term.lower()):
|
||||
terms.append(t)
|
||||
return terms
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue