Fix: index fresh document data after update archive file (#7057)

This commit is contained in:
shamoon 2024-06-21 11:33:01 -07:00 committed by GitHub
parent cccba47bd7
commit 0f9710dc8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -285,6 +285,10 @@ def update_document_archive_file(document_id):
shutil.move(parser.get_archive_path(), document.archive_path)
shutil.move(thumbnail, document.thumbnail_path)
document.refresh_from_db()
logger.info(
f"Updating index for document {document_id} ({document.archive_checksum})",
)
with index.open_index_writer() as writer:
index.update_document(writer, document)