fastrag.ingestion.filters.contentformat#
ContentFormatFilter: filters documents by their content format.
Classes
|
Filters documents by |
- class fastrag.ingestion.filters.contentformat.ContentFormatFilter(include_formats=None, exclude_formats=None)[source]#
-
Filters documents by
metadata["content_format"].Unlike
MediaTypeFilter, a document carrying no recorded format is not treated as unmatchable — it is treated asTEXT, since every document that existed beforecontent_formatwas introduced is plain text by definition.- Parameters:
include_formats (Sequence[ContentFormat | str] | None)
exclude_formats (Sequence[ContentFormat | str] | None)