Thanks Pat!
On Jul 26, 10:06 am, Pat Allan <[email protected]> wrote:
> There isn't a feature to do this for every single search, but there is
> the helper method to escape all special characters:
> Person.search Riddle.escape(params[:search])
>
> --
> Pat
>
> On 26/07/2009, at 1:41 PM,anatolywrote:
>
>
>
> > You are right, that does work. Thanks. I was also wondering if there
> > is a way to tell sphinx to do this automatically, so that I don't need
> > to remember to do this on the params[:search] every time.
>
> > On Jul 25, 11:58 pm, James Healy <[email protected]> wrote:
> >>anatolywrote:
> >>> It seems that when searching in extended mode, sphinx uses @ in a
> >>> way
> >>> that creates a problem... so for example..
>
> >>> Person.search "[email protected]", :match_mode => :extended
> >>> ... does not wok
>
> >>> However, the following does work:
> >>> Person.search "[email protected]"
>
> >>> Somehow I need to tell sphinx how to interpret the @ in this case...
> >>> anyone know how to do that?
>
> >> I *think* you need to escape the @ with a \.
>
> >> Person.search "[email protected]", :match_mode => :extended
>
> >> -- James Healy <jimmy-at-deefa-dot-com> Sun, 26 Jul 2009 13:57:12
> >> +1000
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---