Creates a filter for skipping documents that are not in the specified list of possible extensions.
defcreate_file_extension(cls,extensions):...
Parameter
Type
Description
extensions
list[str]
The list of possible extensions.
Returns: A search document filter by document extension.
Example
fromgroupdocs.search.optionsimportSearchDocumentFilter# Include only FB2 and EPUB documents in the search resultsdocument_filter=SearchDocumentFilter.create_file_extension(".fb2",".epub")