XOR operator in a Query String Query

Hi,

First of all a happy 2025!

I was reading the syntax documentation of the Query String Query and the Simple one.

I noticed there was no XOR operator but there is OR AND and NOT.
So I was wondering if it was possible to use the following instead for a XOR operation: (quick OR fox) AND NOT (quick AND fox)

Thanks!

I have tested this out, and it does seem to work as an XOR query which is nice!

POST xor-indx/_search
{
  "query": {
    "query_string": {
      "default_field": "title",
      "query": "(quick OR fox) AND NOT (quick AND fox)"
    }
  }
}

Only works with the normal query_string though, not the simple_query_string.

(Tested on ES 8.15.0)