mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 09:07:18 +01:00
update index after bulk edit operations #195
This commit is contained in:
parent
fb83069975
commit
6a70369a77
4 changed files with 59 additions and 26 deletions
|
|
@ -94,3 +94,12 @@ def bulk_rename_files(document_ids):
|
|||
qs = Document.objects.filter(id__in=document_ids)
|
||||
for doc in qs:
|
||||
post_save.send(Document, instance=doc, created=False)
|
||||
|
||||
|
||||
def bulk_index_documents(document_ids):
|
||||
documents = Document.objects.filter(id__in=document_ids)
|
||||
|
||||
ix = index.open_index()
|
||||
with AsyncWriter(ix) as writer:
|
||||
for doc in documents:
|
||||
index.update_document(writer, doc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue