langchain4j/document-parsers
Eric Deandrea aea344c244
Add Builder and configurable text extraction to DoclingDocumentParser (#5818)
## Summary
- Introduce a fluent `Builder` for `DoclingDocumentParser` with an
optional `Function<InBodyConvertDocumentResponse, String>`
(`documentTextExtractor`) to customize how document text is extracted
from the Docling conversion response
- Default behavior (markdown extraction) is preserved — the extractor
defaults to `response.getDocument().getMarkdownContent()`
- Deprecate the existing public constructors in favor of the builder,
delegating internally to the builder-based constructor
- Bump `docling-serve-api`/`docling-serve-client` version from 0.5.2 to
0.6.0
- Update documentation at
`docs/docs/integrations/document-parsers/docling.md` with builder usage
and custom extraction examples

## Test plan
- [x] All 17 unit tests pass (7 existing + 10 new) covering builder
construction, custom extractors (HTML, text, doctags), null/blank
extractor results, full response metadata access, and builder with
options
- [x] Integration test with custom extractor against real Docling
container (`DoclingDocumentParserIT`)
- [x] Verify backward compatibility — existing constructor-based tests
pass without modification

---------

Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>
2026-07-30 10:47:15 +02:00
..
langchain4j-document-parser-apache-pdfbox Update versions to 1.19.0-SNAPSHOT and 1.19.0-beta29-SNAPSHOT 2026-07-17 13:42:56 +00:00
langchain4j-document-parser-apache-poi Update versions to 1.19.0-SNAPSHOT and 1.19.0-beta29-SNAPSHOT 2026-07-17 13:42:56 +00:00
langchain4j-document-parser-apache-tika Update versions to 1.19.0-SNAPSHOT and 1.19.0-beta29-SNAPSHOT 2026-07-17 13:42:56 +00:00
langchain4j-document-parser-docling Add Builder and configurable text extraction to DoclingDocumentParser (#5818) 2026-07-30 10:47:15 +02:00
langchain4j-document-parser-markdown Update versions to 1.19.0-SNAPSHOT and 1.19.0-beta29-SNAPSHOT 2026-07-17 13:42:56 +00:00
langchain4j-document-parser-yaml Update versions to 1.19.0-SNAPSHOT and 1.19.0-beta29-SNAPSHOT 2026-07-17 13:42:56 +00:00