mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-06 21:19:54 +02:00
process files with null title (#1989)
This commit is contained in:
parent
036d5c737e
commit
89b6da36a6
@ -129,10 +129,8 @@ def index_doc_batch(
|
|||||||
# already be no documents that are empty.
|
# already be no documents that are empty.
|
||||||
documents_to_process = []
|
documents_to_process = []
|
||||||
for document in documents:
|
for document in documents:
|
||||||
if (
|
if (not document.title or not document.title.strip()) and not any(
|
||||||
not document.title
|
section.text.strip() for section in document.sections
|
||||||
or not document.title.strip()
|
|
||||||
and not any(section.text.strip() for section in document.sections)
|
|
||||||
):
|
):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"Skipping document with ID {document.id} as it has neither title nor content"
|
f"Skipping document with ID {document.id} as it has neither title nor content"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user