Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All Range (Search)

The Range element is an optional child element of the Options element in Search command requests that specifies the maximum number of matching entries to return. The Range element is an optional child element of the Store element in Search command responses that specifies the number of matching entries that are being returned.

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

Options (section


string ([MS-ASDTYPE] section 2.6)

0...1 (optional)

Search command response

Store (section



0...1 (optional)

The result of including more than one Range element in a Search command request is undefined. The server MAY return a protocol status error in response to such a command request.

The Range element value specifies a number of entries, but indicates different things depending on whether the element is in the request or the response XML.

The format of the Range element value is in the form of a zero-based index specifier, formed with a zero, a hyphen, and another numeric value: "m-n." The m indicates the lowest index of a zero-based array that would hold the items. The n indicates the highest index of a zero-based array that would hold the items. For example, a Range element value of 0–9 indicates 10 items, and 0–10 indicates 11 items. A Range element value of 0–0 indicates 1 item.

If the request does not include a Range element, the default Range value for each Store type is used. The following table identifies the default Range values and maximum results returned for each Store type:

Store value

Default range value

Maximum results returned










If the Range element value specified in the request exceeds the default range value, a Status element (section value of 12 is returned to indicate that the maximum range has been exceeded, as specified in section

In the Search command response, the Total element (section indicates an estimate of the total number of entries that matched the Query element (section value.

Search results are stored in a search folder (2) on the server. This way, when a client comes back with the same query but a new row range, rows are pulled from the result set that is currently stored in the search folder (2). The entire result set does not have to be rebuilt.

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, or the Protocol version field, as specified in [MS-ASHTTP] section, in the request.

Protocol version

Element support











© 2015 Microsoft