process files with null title (#1989)

This commit is contained in:
pablodanswer 2024-07-31 08:18:50 -07:00 committed by GitHub
parent 036d5c737e
commit 89b6da36a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,10 +129,8 @@ def index_doc_batch(
# already be no documents that are empty.
documents_to_process = []
for document in documents:
if (
not document.title
or not document.title.strip()
and not any(section.text.strip() for section in document.sections)
if (not document.title or not document.title.strip()) and not any(
section.text.strip() for section in document.sections
):
logger.warning(
f"Skipping document with ID {document.id} as it has neither title nor content"