Creates a filter that skips documents without the specified extensions.
defcreate_file_extension(cls,extensions):...
Parameter
Type
Description
extensions
list[str]
The list of allowable extensions.
Returns: DocumentFilter: A document filter by document extension.
Example
fromgroupdocs.search.optionsimportDocumentFilter# Allow only .htm and .html filesfilter=DocumentFilter.create_file_extension(".htm",".html")print(filter)