3

How to search @ | & ( ) in sphinx.

I want the results contains these symbols, it is keyword for sphinx, how should I search these stuff?

thanks

dexterdeng
  • 249
  • 3
  • 13

2 Answers2

3

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

Nilesh
  • 1,149
  • 9
  • 14
0

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

And of course you need to escape them in search query, like:

$sphinx->Query($sphinx->EscapeString("my@email.com"));
Iaroslav Vorozhko
  • 1,719
  • 14
  • 12