From the advanced query reference document:
Search for issues that have a particular status. You can search by status name or status ID (i.e. the number that Jira automatically allocates to a status).
It is safer to search by status ID than status name. It is possible for your Jira administrator to change the name of a status, which could break any saved filter that rely on that name. Status IDs, however, are unique and cannot be changed.
Fantastic. How do I write a query using status ID? Where do I find these ID values? Where is the documentation detailing the Status ID values? e.g. 1 = Open; 2 = Closed; etc.