[SalesForce] Does SOSL allow the `-` dash character

According to the documentation you need to escape the following special characters in SOSL search text.

Escaping special characters & | ! ( ) { } [ ] ^ “ ~ * ? : \ '

The - dash character is not in that list, yet when I attempt SOSL with the - dash character in the search text I get the following error:

line 1:14 mismatched character '-' expecting '}'

A sample SOSL that returns the error is:

FIND {some-email@gmail.com} IN EMAIL FIELDS RETURNING Lead, Contact

When I escape the - dash character the SOSL query works just fine.

FIND {some\-email@gmail.com} IN EMAIL FIELDS RETURNING Lead, Contact

Am I doing something wrong, is this a bug in Salesforce, or is the documentation incomplete?

Best Answer

Not sure why that part of the documentation is not mentioning - and + characters, but they are reserved according to this documentation:

Reserved Characters

The following characters are reserved: ? & | ! { } [ ] ( ) ^ ~ * : \ " ' + -

Reserved characters, if specified in a text search, must be escaped (preceded by the backslash \ character) in order to be properly interpreted. An error occurs if you do not precede reserved characters with a backslash. This is true even if the SearchQuery is enclosed in double quotes.