Hi Aditya Sorry for the slow response on this. Thinking Sphinx has a dependency, Riddle, which has an escape method: Riddle.escape "c/o so and so"
This is the best way to clean up user-provided data. Cheers -- Pat On 12/04/2011, at 6:03 PM, Aditya wrote: > Hi! > > Our applications user's are non-technical persons who are not aware of > regular expressions. They often search for strings such "c/o So And > So". This crashes the search since Sphinx thinks its an incomplete > regular expression. > If i escape the slash "c\/o So And So" it works fine. Explaining that > to our users would be next to impossible. I'm wondering what I can do > so search terms entered can be handled as entered, simply. I'm using > the default match mode on Sphinx version 1.10beta in a Rails 2 app. > > Is there a configuration preference i can setup? Any suggestion is > welcome. > > Cheers, > Aditya > > Error -> > > index customer_core: syntax error, unexpected '/', expecting $end near > '/o @company_id 1') on line #1 of app/views/customers/index.html.haml: > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
