How to search @ | & () in the sphinx

How to search @ | and () in the sphinx.

I want the results to contain these characters, this is a keyword for sphinx, how do I search for these things?

thank

+3


source to share


2 answers


You need to avoid these characters by inserting "\" before it or use Riddle.escape (string). Here is a related issue: one github: https://github.com/freelancing-god/thinking-sphinx/issues/235



+3


source


To be able to search by these characters, you need to add them to charset_table, see charset_table documentation

And of course you need to avoid them in your search query, for example:



$sphinx->Query($sphinx->EscapeString("my@email.com"));

      

0


source







All Articles