com.groupdocs.search

Class SearchDocumentFilter



  • public class SearchDocumentFilter
    extends Object

    Contains methods for creating search document filters.

    • Constructor Detail

      • SearchDocumentFilter

        public SearchDocumentFilter()
    • Method Detail

      • createFilePathRegularExpression

        public static ISearchDocumentFilter createFilePathRegularExpression(String pattern)

        Creates filter for skipping documents that are not match a regular expression. The regular expression is applied to the full path of a document.

        Parameters:
        pattern - The regular expression pattern.
        Returns:
        A search document filter by file name.
      • createFilePathRegularExpression

        public static ISearchDocumentFilter createFilePathRegularExpression(String pattern,
                                                            int options)

        Creates filter for skipping documents that are not match a regular expression. The regular expression is applied to the full path of a document.

        Parameters:
        pattern - The regular expression pattern.
        options - The regular expression options.
        Returns:
        A search document filter by file name.
      • createFileExtension

        public static ISearchDocumentFilter createFileExtension(String... extensions)

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

        Parameters:
        extensions - The list of possible extensions.
        Returns:
        A search document filter by document extension.
      • createNot

        public static ISearchDocumentFilter createNot(ISearchDocumentFilter innerFilter)

        Creates filter that has inverse logic in relation to the specified inner filter.

        Parameters:
        innerFilter - The inner search document filter.
        Returns:
        An inverted search document filter.
      • createAnd

        public static ISearchDocumentFilter createAnd(ISearchDocumentFilter... filters)

        Creates logical conjunction of the specified filters.

        Parameters:
        filters - The search document filters.
        Returns:
        A search document filter that represents result of conjunction of the specified filters.
      • createOr

        public static ISearchDocumentFilter createOr(ISearchDocumentFilter... filters)

        Creates logical disjunction of the specified filters.

        Parameters:
        filters - The search document filters.
        Returns:
        A search document filter that represents result of disjunction of the specified filters.
      • createAttribute

        public static ISearchDocumentFilter createAttribute(String... attributes)

        Creates a filter for skipping documents that do not have any value from the specified list of allowable attributes.

        Parameters:
        attributes - The list of allowable attributes.
        Returns:
        A search document filter by document attribute.