+ <sect2>
+ <title>Protocol behavior</title>
+ <para>
+ The creation of a result set involves at least a SearchRequest
+ - SearchResponse protocol handshake. Following that, if a sort
+ critieria was specified as part of the query, a sortRequest -
+ SortResponse handshake takes place. Note that it is necessary to
+ perform sorting before any retrieval takes place, so no records will
+ be returned from the target as part of the SearchResponse because these
+ would be unsorted. Hence, piggyback is disabled when sort critieria
+ is set. Following Search - and a Possible sort, Retrieval takes
+ place - as one or more Present Requests - Present Response being
+ transferred.
+ </para>
+ <para>
+ The API allows for two different modes for retrieval. A high level
+ mode which is somewhat more powerful and a low level one.
+ The low level is "enabled" when the settings
+ <literal>smallSetUpperBound</literal>,
+ <literal>mediumSetPresentNumber</literal> and
+ <literal>largeSetLowerBound</literal> are set. The low level mode
+ thus allows you to precisely set how records are returned as part
+ of a search response as offered by the Z39.50 protocol.
+ Since the client may be retrieving records as part of the
+ search response, this mode doesn't work well if sorting is used.
+ </para>
+ <para>
+ The high-level mode allows you to fetch a range of records from
+ the result set with a given start offset. When you use this mode
+ the client will automatically use piggyback if that is possible
+ with the target and perform one or more present requests as needed.
+ Even if the target returns fewer records as part of a present response
+ because of a record size limit, etc. the client will repeat sending
+ present requests. As an example, if option <literal>start</literal>
+ is 0 (default) and <literal>count</literal> is 4, and
+ <literal>piggyback</literal> is 1 (default) and no sorting critieria
+ is specified, then the client will attempt to retrieve the 4
+ records as part the search response (using piggyback). On the other
+ hand, if either <literal>start</literal> is positive or if
+ a sorting criteria is set, or if <literal>piggyback</literal>
+ is 0, then the client will not perform piggyback but send Present
+ Requests instead.
+ </para>
+ <para>
+ If either of the options <literal>mediumSetElementSetName</literal> and
+ <literal>smallSetElementSetName</literal> are unset, the value
+ of option <literal>elementSetName</literal> is used for piggyback
+ searches. This means that for the high-level mode you only have
+ to specify one elementSetName option rather than three.
+ </para>
+ </sect2>