Working with search filters by using the EWS Managed API
The SearchFilter represents the restriction or query that is used to filter items or folders in FindItems, FindFolders and search folder operations. The abstract SearchFilter class allows you to search an Exchange mailbox for items or folders that meet the criterion of a search filter and all items of the returned collection will meet the criterion of that specific search filter. Use the descendant search filter classes shown below to define a search filter.
The following SearchFilter members can assist you in working with search filters. Each topic contains an example of using a search filter to return items from the Exchange mailbox that satisfy the specific search criteria.
- Filtering on ContainsSubstring by using the EWS Managed API: Represents a search expression that checks for the presence of a substring inside a text property.
- Filtering on ExcludesBitmask by using the EWS Managed API: Represents a search expression that contains a bitmask operator that filters on items not containing any of the specified bitwise mask.
- Filtering on Exists by using the EWS Managed API: Represents a search expression that can be used to determine if an item contains a specific property.
- Filtering on IsEqualTo by using the EWS Managed API: Represents a search expression that compares a property with either a constant value or another property and evaluates if they are equal.
- Filtering on IsGreaterThan by using the EWS Managed API: Represents a search expression that compares a property with either a constant value or another property and evaluates if one property is greater than another.
- Filtering on IsGreaterThanOrEqualTo by using the EWS Managed API: Represents a search expression that compares a property with either a constant value or another property and evaluates if one property is greater than or equal to another.
- Filtering on IsLessThan by using the EWS Managed API: Represents a search expression that compares a property with either a constant value or another property and evaluates if one property is less than another.
- Filtering on IsLessThanOrEqualTo by using the EWS Managed API: Represents a search expression that compares a property with either a constant value or another property and evaluates if one property is less than or equal to another.
- Filtering on IsNotEqualTo by using the EWS Managed API: Represents a search expression that compares a property with either a constant value or another property and evaluates if they are not equal.
- Filtering on Not by using the EWS Managed API: Represents a search expression that negates the Boolean value of the search expression that it contains.
- Filtering on SearchFilterCollection by using the EWS Managed API: Represents a collection of search filters linked by a logical operator. Applications can use SearchFilterCollection to define complex search filters such as "Condition1 AND Condition2".