sphinx-searchHow to use forward slash in SphinxSearch?
SphinxSearch uses forward slash (/
) as a special character to separate search terms. It is used to search for exact phrases, and to group search terms together.
Example
SELECT * FROM documents WHERE MATCH('"hello world"/2');
This query will search for documents containing the exact phrase "hello world" with a maximum of two words between them.
Code explanation
SELECT * FROM documents
: This part of the code selects all columns from the documents table.WHERE MATCH('"hello world"/2')
: This part of the code searches for documents containing the exact phrase "hello world" with a maximum of two words between them.
Helpful links
More of Sphinx Search
- How to order search results by relevance in SphinxSearch?
- How to specify stop words in SphinxSearch?
- How to use the MySQL protocol in SphinxSearch?
- How to get the version of SphinxSearch?
- How to use SphinxSearch with PHP?
- How to use regexp_filter in SphinxSearch?
- How to use query_log_format in SphinxSearch?
- How to configure max_children in SphinxSearch?
- How to use sql_attr_float in SphinxSearch?
See more codes...