Answer the question
In order to leave comments, you need to log in
.NET + Sphinx. How not to escape # and @?
I am using MySqlCommand to connect. I form the text of the request to the Sphinx according to the following template:
"select Id, WEIGHT() as weight from ind WHERE MATCH ('"+ searchString + "')"
searchString.Replace("@","\\\\@").Replace("#", "а")
Answer the question
In order to leave comments, you need to log in
the correct solution is to skip only allowed characters at the
same time with the regexp and you can translate to lower case
all special characters must be escaped, for this there are ready-made functions in all languages
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question