Skip to main content

EmbeddedConfig

Controls how embedded documents within containers are handled during parsing.

Notes

Controls how the DefaultParser handles embedded documents (such as email attachments or files within ZIP archives). Supports splitting embedded documents into individual documents, skipping embedded documents by content type, and skipping embedded documents based on the container content type.

Usage

maxEmbeddedDepth: 0
skipEmbeddedContentTypes:
- ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
skipEmbeddedOfContentTypes:
- ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
splitContentTypes:
- ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false

Properties

PropertyTypeRequiredDefault
maxEmbeddedDepthintegerNo-1
skipEmbeddedContentTypesTextMatcher[]No-
skipEmbeddedOfContentTypesTextMatcher[]No-
splitContentTypesTextMatcher[]No-

Property Details

maxEmbeddedDepth

How deep to follow embedded documents. 0 is the container itself, 1 its immediate attachments, and so on. Default is -1, unlimited. Embedded documents nest — a zip holding an email holding a PDF — so a limit is worth setting when containers are untrusted.

skipEmbeddedContentTypes

Content types of the embedded documents to leave unparsed, whatever contains them. A common use is skipping the images embedded in office documents, which are numerous and rarely worth extracting.

skipEmbeddedOfContentTypes

Content types of container files whose embedded documents should not be parsed at all. Use it to ignore the innards of a container type wholesale — the container itself is still processed.

splitContentTypes

Content types of container files whose embedded documents should become documents in their own right. By default nothing is split: embedded content and metadata are merged into the parent.

Split documents go through the whole import cycle themselves, this parser included, and are returned as a nested tree under the container.