Closed lephyrius closed 11 years ago
What does a straight Riddle.escape('@terraria')
output in the console?
Here is that:
1.9.3p327 :001 > Riddle.escape('@terraria')
=> "\\@terraria"
So it turns out Riddle.escape isn't quite as thorough as I'd hoped. For some reason, Sphinx requires certain characters to be double-escaped: @ becomes \\@.
You could write some code to handle that yourself, though I've found in my quick testing that running a query through Riddle.escape twice does the trick: Riddle.escape(Riddle.escape('@terraria'))
Is this something that will be fixed in future riddle? Then I might go with this as a temporary solution:
Riddle.escape(Riddle.escape('@terraria'))
Otherwise I might need to code my own cleaner. Is there any URL I can find the chars that need to be double escaped in sphinx?
I've added Riddle::Query.escape - as the behaviour's different between the older binary protocol (Riddle.escape) and SphinxQL/MySQL41 protocol (Riddle::Query.escape). It's part of the new 1.5.5 release.
Im using:
And TS3. I get this error:
The search term is: "@terraria" Here is the relevant stack trace:
The code is simple:
I hope I put this at the right place if so I can create a new one in the TS issue tracker.