create_file_extension method

create_file_extension

Creates a filter for skipping documents that are not in the specified list of possible extensions.

def create_file_extension(cls, extensions):
    ...
Parameter Type Description
extensions list[str] The list of possible extensions.

Returns: A search document filter by document extension.

Example

from groupdocs.search.options import SearchDocumentFilter

# Include only FB2 and EPUB documents in the search results
document_filter = SearchDocumentFilter.create_file_extension(".fb2", ".epub")

See Also