Results > Manipulate the Results Set > Store and Retrieve the Result State > Query with the State Token

Query with the State Token
When querying, you can use the StateID, StateMatchID, and StateDontMatchID parameters to pass a state token. These parameters are similar to the ID, MatchID, and DontMatchID parameters that specify individual document IDs.
 
StateID, StateMatchID, StateDontMatchID
If you use StateMatchID and StateDontMatchID in the same action, IDOL removes any documents in the StateDontMatchID list from the StateMatchID list.
Examples:
*
Retrieve all documents. Use the StateID parameter to retrieve all documents in the token:
http://localhost:20000/action=getcontent&stateid=CWQ4FJ9LZSE5-6
*
Query only the specified documents. Use the StateMatchID parameter to, for example, query only the first four documents in the stored result set:
http://localhost:20000/action=query&text=pear&statematchid=CWQ4FJ9LZSE5-6[0-3]
*
Query all but the specified documents. Use the StateDontMatchID parameter to, for example, query all IDOL server except for the documents specified in the token:
http://localhost:20000/action=query&text=pear&statedontmatchid=CWQ4FJ9LZSE5-6
 
NOTE A stored-state-aware DAH forwards any query that includes a state token to the IDOL server that originally created the token.