Hi Pedro
There's no specific TS/Ruby exception for the syntax errors - but you could try
catching ThinkingSphinx::SphinxError.
Also, perhaps it's worth considering escaping user input to search queries?
Riddle.escape('@foo') # => '\@foo'
--
Pat
On 23/03/2011, at 9:04 AM, Pedro Cunha wrote:
> Hello,
>
> Seems like extended mode, as search mode, is nearly perfect but can
> also do a lot of weird things making sphinx to just go nutz.
>
> I would like to be to search for:
>
> 1) word1 word2 word3
>
> 2) "word1 word2 word3"
>
> Which can and shall retrive different results.
>
> Browsing over the docs looks like the extended mode allows this.
>
> But I'm bit concerned about the parser, because It allows a lot of
> other functionalities and if you make a typo (which could be on
> purpose..), sphinx just throws an error. Escaping the search query
> doesn't seem to solve everything, I know I can write things @field or
> < > etc.. Is there a clean way to properly catch this syntax/parser
> errors?
>
> Best regards,
> Pedro
>
> --
> 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.