fix(docreader): remove default 100-page limit for DOCX parsing
The default DOCREADER_DOCX_MAX_PAGES=100 silently truncates large documents, causing users to see at most ~1000 chunks regardless of document length. Change the default to 0 (no limit) so all pages are processed. Operators who need a cap can still set the env var. Fixes #719
This commit is contained in:
@@ -97,6 +97,8 @@ class DocxParser(BaseParser):
|
||||
"""
|
||||
super().__init__(**kwargs)
|
||||
self.max_pages = CONFIG.docx_max_pages if max_pages is None else max_pages
|
||||
if self.max_pages <= 0:
|
||||
self.max_pages = 100000 # no limit (matches Docx.__call__ default)
|
||||
logger.info(f"DocxParser initialized with max_pages={self.max_pages}")
|
||||
|
||||
def parse_into_text(self, content: bytes) -> DocumentModel:
|
||||
|
||||
Reference in New Issue
Block a user