SearchDocumentFilter
Leave feedback
On this page
Inheritance: java.lang.Object
public class SearchDocumentFilter
Contains methods for creating search document filters.
Learn more
| Constructor | Description |
|---|---|
| SearchDocumentFilter() |
| Method | Description |
|---|---|
| createFilePathRegularExpression(String pattern) | Creates a filter for skipping documents that are not match a regular expression. |
| createFilePathRegularExpression(String pattern, int options) | Creates a filter for skipping documents that are not match a regular expression. |
| createFileExtension(String[] extensions) | Creates a filter for skipping documents that are not in the specified list of possible extensions. |
| createNot(ISearchDocumentFilter innerFilter) | Creates a filter that has inverse logic in relation to the specified inner filter. |
| createAnd(ISearchDocumentFilter[] filters) | Creates a logical conjunction of the specified filters. |
| createOr(ISearchDocumentFilter[] filters) | Creates a logical disjunction of the specified filters. |
| createAttribute(String[] attributes) | Creates a filter for skipping documents that do not have any value from the specified list of allowable attributes. |
public SearchDocumentFilter()
public static ISearchDocumentFilter createFilePathRegularExpression(String pattern)
Creates a filter for skipping documents that are not match a regular expression. The regular expression is applied to the full path of a document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pattern | java.lang.String | The regular expression pattern. |
Returns: ISearchDocumentFilter - A search document filter by file name.
public static ISearchDocumentFilter createFilePathRegularExpression(String pattern, int options)
Creates a filter for skipping documents that are not match a regular expression. The regular expression is applied to the full path of a document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pattern | java.lang.String | The regular expression pattern. |
| options | int | The regular expression options. |
Returns: ISearchDocumentFilter - A search document filter by file name.
public static ISearchDocumentFilter createFileExtension(String[] extensions)
Creates a filter for skipping documents that are not in the specified list of possible extensions.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| extensions | java.lang.String[] | The list of possible extensions. |
Returns: ISearchDocumentFilter - A search document filter by document extension.
public static ISearchDocumentFilter createNot(ISearchDocumentFilter innerFilter)
Creates a filter that has inverse logic in relation to the specified inner filter.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| innerFilter | ISearchDocumentFilter | The inner search document filter. |
Returns: ISearchDocumentFilter - An inverted search document filter.
public static ISearchDocumentFilter createAnd(ISearchDocumentFilter[] filters)
Creates a logical conjunction of the specified filters.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filters | ISearchDocumentFilter[] | The search document filters. |
Returns: ISearchDocumentFilter - A search document filter that represents result of conjunction of the specified filters.
public static ISearchDocumentFilter createOr(ISearchDocumentFilter[] filters)
Creates a logical disjunction of the specified filters.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filters | ISearchDocumentFilter[] | The search document filters. |
Returns: ISearchDocumentFilter - A search document filter that represents result of disjunction of the specified filters.
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:
| Parameter | Type | Description |
|---|---|---|
| attributes | java.lang.String[] | The list of allowable attributes. |
Returns: ISearchDocumentFilter - A search document filter by document attribute.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.