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

Store the Result State
To create a state token from your query results, use the StoreState parameter when you issue the query:
http://localhost:20000/action=query&text=apple&storestate=true
To use document references, rather than DocIDs, add the StoredStateField parameter:
 
http://localhost:20000/action=query&text=apple&storestate=true&StoredStateField=Reference
The returned results include a tag set that holds the token name, for example <autn:state>CWQ4FJ9LZSE5-6</autn:state>.
If the query is likely to return a very large data set, you can optimize performance by not printing the query results (assuming that you want only the state token):
http://localhost:20000/action=query&text=apple&storestate=true&maxresults=5000&print=noresults