Results > Manipulate the Results Set > Store and Retrieve the Result State

Store and Retrieve the Result State

Topics in this Section

Whenever you use the Query, Suggest, or SuggestOnText actions, you can save result state (the DocID values of all returned results) in a state token. In subsequent actions, you can use this token to represent the documents from that result set.
A state token is an array of DocID values. Its name is of the form ABCDEFGHN, where ABCDEFGH is a random alphanumeric string (generated at query time), and N is the number of document IDs that the token holds. You can also use document references to create state tokens, rather than document IDs. In this case, use the StoredStateField parameter to specify the name of the field that contains the references.
When you have a state token, supply the token name to specify the entire set of documents (for example, CWQ4FJ9LZSE5-6). You can also use a (zero-based) array notation to specify a subset of the documents (for example, CWQ4FJ9LZSE5-6[3] to select the fourth document in the array).
Tokens in the array are in the same order as in the returned results.
IDOL server stores tokens persistently, in the directory installDir/idol/IDOLServer/serviceAlias/agentstore/storedstate.