# MultiStageStartState

The `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>

where,

`<requested number>` | is the number of results requested.
`<stage>` | is the stage concerned.
`<start document>` | is the first document returned in the stage.
`<end document>` | is the last document returned in the stage.
`<total available>` | is the total number of results available in the stage.

For example, the string:

    6?1:1-6/6;

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:

    6/1:7-9/3;2:1-3/4;

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:

    http://<host>:<port>/Action=Query&Text=test&MultiStage=True&MultiStageStartState=20?1:1-10/10;2:1-10/15;

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:

    <autn:multistagestartstate eos="1">200?4:4-18/18;</autn:multistagestartstate>

To return results that would be skipped for the specified start state, you can use the MultiStagePageBackward parameter to specify the number.

NOTE: If you do not set `MultiStageStartState`, DAH does not skip results.

Actions: | Query SuggestOnText
Type: | String
Default: |
Example: | `MultiStageStartState=20?1:1-10/10;2:1-10/15;`
See Also: | DAHStartState MultiStage MultiStageInfo MultiStageMinResults MultiStagePageBackward MultiStageTotalStages

© Copyright 2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm