sphinx-searchHow to escape a search query in SphinxSearch?
SphinxSearch supports escaping special characters in search queries using backslash (\
). For example, if you want to search for a phrase containing a special character, such as +
, you can escape it using a backslash:
SELECT * FROM table WHERE MATCH('\+')
The output of the above query will be all the records containing the +
character.
The following list contains the special characters that need to be escaped in SphinxSearch:
+
: Plus sign-
: Minus sign!
: Exclamation mark(
: Left parenthesis)
: Right parenthesis{
: Left curly brace}
: Right curly brace[
: Left square bracket]
: Right square bracket^
: Caret"
: Double quote~
: Tilde*
: Asterisk?
: Question mark:
: Colon
For more information, please refer to the SphinxSearch documentation.
More of Sphinx Search
- How to use regexp_filter in SphinxSearch?
- How to configure memory usage in SphinxSearch?
- How to use phrase_boundary in SphinxSearch?
- How to query a specific index in SphinxSearch?
- How to order search results by relevance in SphinxSearch?
- How to use SphinxSearch with PHP?
- How to use sql_attr_json in SphinxSearch?
- How to use sql_attr_float in SphinxSearch?
- How to specify stop words in SphinxSearch?
- How to delete an index in SphinxSearch?
See more codes...