2.2.3.142.2 Query (Search)

The Query element is a required child element of the Store element in Search command requests that specifies the keywords to use for matching the entries in the store that is being searched.

All elements referenced in this section are defined in the Search namespace.

Command request/response

Parent elements

Child elements

Data type

Number allowed

Search command request (section 2.2.1.16)

Store (section 2.2.3.178.3)

And (section 2.2.3.10)

EqualTo (section 2.2.3.62)

container ([MS-ASDTYPE] section 2.2)

1...1 (required)

The value of the Query element is used as a prefix-string matching pattern, and returns entries that match the beginning of the string. For example, searching for "John" would match "John Frum", but would not match "Barry Johnson" or "James Littlejohn".

All nonempty text properties in the GAL that are indexed by using ANR are compared with the Query element value. Search comparisons are performed by using case-insensitive matching.

For a Windows SharePoint Services document library search, this protocol supports queries of the following form: LinkId == value, where value specifies the URL of the item or folder and LinkId indicates that the value is to be compared to the link ID property.

For mailbox search, the query syntax is as follows:

  • Folders can be specified in the following ways:

    • Specified ID

    • Specified folder and subfolders

    • All email folders, including Draft, Inbox and subfolders, Outbox, and Sent Items

  • The basic keyword query can be composed of the following:

    • The basic operator: And (section 2.2.3.10)

    • A dateTime filter specified by using the GreaterThan (section 2.2.3.86) and LessThan elements (section 2.2.3.96)

    • FreeText elements (section 2.2.3.80.2) that contain keywords

The basic keyword query is executed against all indexed properties.

Protocol Versions

The following table specifies the protocol versions that support this element. The client indicates the protocol version being used by setting either the MS-ASProtocolVersion header, as specified in [MS-ASHTTP] section 2.2.1.1.2.6, or the Protocol version field, as specified in [MS-ASHTTP] section 2.2.1.1.1.1, in the request.

Protocol version

Element support

2.5

Yes

12.0

Yes

12.1

Yes

14.0

Yes

14.1

Yes

16.0

Yes

16.1

Yes

Show: