create_file_length_range method

create_file_length_range

Creates a filter for skipping documents out of the specified document length range.

def create_file_length_range(cls, lower_bound, upper_bound):
    ...
Parameter Type Description
lower_bound int The lower bound of the document length.
upper_bound int The upper bound of the document length.

Returns: A document filter by document length.

Example

from groupdocs.search.options import DocumentFilter

# Skip documents smaller than 100 KB and larger than 5 MB
filter3 = DocumentFilter.create_file_length_range(100 * 1024, 5 * 1024 * 1024)
print(filter3)

See Also