Delen via


2.2.3.143.3 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 2.2.1.16)

Options (section 2.2.3.125.5)

None

string ([MS-ASDTYPE] section 2.7)

0...1 (optional)

Search command response

Store (section 2.2.3.178.3)

None

string

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

Mailbox

0-99

100

DocumentLibrary

0-999

1000

GAL

0-99

100

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

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

Search results are stored in a search folder 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. 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 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