Open topic with navigation
MultiStageStartState parameter allows you to carry out batch processing of results for a multistage query. Specify a start state to enable the DAH to:
skip query results that have already been processed under earlier multistage queries.
specify the number of results wanted from each stage in the multistage query.
specify the total number of results wanted from the multistage query.
All multistage queries, including those where no
MultiStageStartState is specified, return a start state value in the
<autn:multistagestartstate> tag which represents the current state of the collection of results. The state is a string of the form:
<requested number>?<stage>:<start document>-<end document>/<total available>
||is the number of results requested.|
||is the stage concerned.|
||is the first document returned in the stage.|
||is the last document returned in the stage.|
||is the total number of results available in the stage.|
For example, the string:
represents a state of all six results in stage one, where a total of six results are available, when six results are requested. You can combine the states from different stages, separated with semicolons, to form new states. For example:
represents a state of the last three results from stage one, starting from result seven, and the first three results from stage two, where a total of four are available, when six results are requested.
You can specify a start state for a multistage query in a similar way that you specify DAHStartState for a normal query. For example:
In this example, the start state shows that 10 results of a possible 10 from stage one have been collected, and that 10 results of a possible 15 from stage two have been collected. Because 20 results are requested, stage one is skipped, and results 11 to 15 from stage two are returned. In addition, the next 15 results in later stages are returned, together with a new state string that represents these 20 results.
If DAH reaches the end of states, which means there are no more results after the current set, the
eos attribute is set to
1 in the
<autn:multistagestartstate> tag of the response. For example:
To return results that would be skipped for the specified start state, you can use the MultiStagePageBackward parameter to specify the number.
If you do not set
MultiStageStartState, DAH does not skip results.