Search Statuses, Non-surrogate Diagnostics, and Result Set


Issue raised by: Pieter Van Lierop, Geac France; Wed, 22 Apr 1998 17:13:00 +01


Synopsis:
When is a search considered successful and when is it considered to have failed? If a search results in zero records identified, does that necessarily constitute failure? What is the relationship among the various Search response statuses (Search-status, Present-status, Result-set-status), in particular with respect to the presence of non-surrogate diagnostics and the existence of a result set?

Response:
In a Z39.50 Search operation, the client supplies search criteria and requests the server to:
Notes:
  1. If no records were identified (see note 2), the server might not physically create a result set, but in the abstract sense an empty result set is assumed to have been created; see clarification Zero Results.
  2. The qualification "no records were identified" means that the server performed the search and is stating that "there are no records meeting the criteria"; it does not mean "the server was unable to determine the number and thus no records were identified".
  3. The number, which may be zero, depends on the result count and the values of the search request parameters Small-set-upper-bound, Large-set-lower-bound, and Medium-set-present-number.
The search operation consists of a search phase and a retrieval phase, where (a), (b), and (c) correspond to the search phase and (d) to the retrieval phase.

The search is considered to succeed if and only if the server is able to perform (a), (b), and (c).

In answer to the second question, it may thus be inferred that if a search results in the identification of zero records (that is, if the server determines that no records meet the criteria), this does not constitute failure. In Z39.50, "search" does not so much connote "locate" (as in the classical usage of the term "search") as it means "identify how many and which items meet specified criteria". "None" is a valid answer to "how many" (and in that case, the "which" part does not apply). The search-status values of 'success' and 'failure' correspond respectively to whether the search succeeds or not.

When the search succeeds, a result set is created. If the search fails, a result set may or may not be created, and its existence may be determined by the value of Result-set-status (see table below). Result-set-status occurs if and only if the search fails; if the search succeeds, the existence of the result set is implicitly known (it exists) and therefore the parameter is not necessary.

There is a retrieval phase if and only if the search succeeds, and if so, the response parameter Present-status occurs.

Therefore exactly one of the parameters Result-set-status and Present-status occurs in the response. Result-set-status corresponds to a search that fails, and Present-status to a search that succeeds.

Present-status has values of 'success' or 'failure', similar to Search-status (though, in contrast, Present-status has additional intermediate statuses as well). 'success' means that the server presented all of the response records (retrieval or surrogate diagnostic records) that it attempted to present; 'failure' means that it was unable to present any of the records (cases where the server presents some, but not all, are covered by the intermediate statuses).

Whenever either Search-status or Present-status is 'failure', the server must provide one or more non-surrogate diagnostics, supplying diagnostic information associated with the failure.

The following table summarizes the relationship among the statuses, the presence of non-surrogate diagnostics, and the existence of a result set.

Search StatusPresent StatusResult Set StatusNon-surrogate diagnosticResult set
successsuccess (or partial)must not occurmust not occur yes
successfailuremust not occurat least oneyes
failuremust not occurmust occurat least oneyes if result-set-status 'subset' or 'interim'; no if 'none'.

Status: Approved (6/98)
Library of Congress