Skip to content

feat(documents): add docling (docling-serve) parsing backend#1

Closed
yuisheaven wants to merge 2 commits into
masterfrom
claude/nextcloud-docling-integration-vbg9jt
Closed

feat(documents): add docling (docling-serve) parsing backend#1
yuisheaven wants to merge 2 commits into
masterfrom
claude/nextcloud-docling-integration-vbg9jt

Conversation

@yuisheaven

@yuisheaven yuisheaven commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Add docling-serve as an OCR-strong document-parsing backend alongside
unstructured, for photographed/scanned/handwritten text.

  • Images auto-route to a new images-only DoclingProcessor (priority 20).
  • Scanned/no-text-layer PDFs escalate to docling via
    DOCUMENT_OCR_PROVIDER=docling, reusing the classifier's text-layer
    detection so born-digital PDFs stay on the cheap local tiers.
  • nc_webdav_read_file gains a force_processor argument so the caller can
    re-parse a text-layer PDF (tables / partial text) with docling on demand.

One shared docling-serve HTTP client (document_processors/docling_serve.py)
backs both the DoclingProcessor and the OCR-tier _DoclingServeBackend.

Config: ENABLE_DOCLING, DOCLING_API_URL, DOCLING_TIMEOUT, DOCLING_OCR_LANG,
DOCLING_DO_OCR; docling added to the document_ocr_provider enum. New docling
docker-compose profile. See docs/ADR-031.

Repository owner deleted a comment from claude Bot Jul 2, 2026
@yuisheaven yuisheaven force-pushed the claude/nextcloud-docling-integration-vbg9jt branch from 378ccf0 to 6e4dd00 Compare July 2, 2026 11:26
@claude

claude Bot commented Jul 2, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

claude added 2 commits July 2, 2026 11:45
Add docling-serve as an OCR-strong document-parsing backend alongside
unstructured, for photographed/scanned/handwritten text.

- Images auto-route to a new images-only DoclingProcessor (priority 20).
- Scanned/no-text-layer PDFs escalate to docling via
  DOCUMENT_OCR_PROVIDER=docling, reusing the classifier's text-layer
  detection so born-digital PDFs stay on the cheap local tiers.
- nc_webdav_read_file gains a force_processor argument so the caller can
  re-parse a text-layer PDF (tables / partial text) with docling on demand.

One shared docling-serve HTTP client (document_processors/docling_serve.py)
backs both the DoclingProcessor and the OCR-tier _DoclingServeBackend.

Config: ENABLE_DOCLING, DOCLING_API_URL, DOCLING_TIMEOUT, DOCLING_OCR_LANG,
DOCLING_DO_OCR; docling added to the document_ocr_provider enum. New docling
docker-compose profile. See docs/ADR-031.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- convert_file: raise ProcessorError (not JSONDecodeError/AttributeError) on a
  non-JSON or non-object docling-serve response, honoring the documented contract.
- docling OCR backend always sends do_ocr=true (it IS the OCR tier); DOCLING_DO_OCR
  now tunes only the image processor, so it can't silently no-OCR scanned PDFs.
  Dropped docling_do_ocr from Settings/env-map (kept in _DEFAULTS for the image path).
- Drop the misleading hardcoded docling_status metadata.
- Docs: correct the docling image MIME list (add gif/webp) + clarify DOCLING_DO_OCR scope.
- Tests: cover convert_file non-dict/non-JSON bodies and the progress-callback path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@yuisheaven yuisheaven force-pushed the claude/nextcloud-docling-integration-vbg9jt branch from 6e4dd00 to e2ddfc7 Compare July 2, 2026 11:50
@yuisheaven yuisheaven closed this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants