Contains
Article 03/29/2023
6 contributors
Feedback
In this article
The Contains element represents a search expression that determines whether a given property contains the supplied constant string value.
<Contains ContainmentMode="" ContainmentComparison="">
<FieldURI/>
<Constant/>
</Contains>
<Contains ContainmentMode="" ContainmentComparison="">
<ExtendedFieldURI/>
<Constant/>
</Contains>
<Contains ContainmentMode="" ContainmentComparison="">
<IndexedFieldURI/>
<Constant/>
</Contains>
ContainsExpressionType
Attributes and elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute
Description
ContainmentMode
Identifies the boundaries of a search.
ContainmentComparison
Determines whether the search ignores cases and spaces.
ContainmentMode attribute values
Value
Description
FullString
The comparison is between the full string and the constant. The property value and the supplied constant are precisely the same.
Prefixed
The comparison is between the string prefix and the constant.
Substring
The comparison is between a substring of the string and the constant.
PrefixOnWords
The comparison is between a prefix on individual words in the string and the constant.
ExactPhrase
The comparison is between an exact phrase in the string and the constant.
ContainmentComparison attribute values
Value
Description
Exact
The comparison must be exact.
IgnoreCase
The comparison ignores casing.
IgnoreNonSpacingCharacters
The comparison ignores non-spacing characters.
Loose
To be removed.
IgnoreCaseAndNonSpacingCharacters
The comparison ignores casing and non-spacing characters.
LooseAndIgnoreCase
To be removed.
LooseAndIgnoreNonSpace
To be removed.
LooseAndIgnoreCaseAndIgnoreNonSpace
To be removed.
Child elements
Element
Description
FieldURI
Identifies frequently referenced properties by URI.
IndexedFieldURI
Identifies individual members of a dictionary.
ExtendedFieldURI
Identifies MAPI properties.
Constant
Identifies a constant value in a restriction.
Parent elements
Element
Description
Restriction
Represents the restriction or query that is used to filter items or folders in FindItem/FindFolder and search folder operations.
Not
Represents a search expression that negates the Boolean value of the search expression it contains.
And
Represents a search expression that allows you to perform a Boolean And operation between two or more search expressions. The result of the And operation is true if all of the search expressions contained within the And are true .
Or
Represents a search expression that performs a logical OR on the search expression it contains. The Or element will return true if any of its children return true .
The attributes are used to determine how the elements are matched.
The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server 2007 that has the Client Access server role installed.
Element
Example
Namespace
http://schemas.microsoft.com/exchange/services/2006/types
Schema Name
Types schema
Validation File
Types.xsd
Can be Empty
False
See also