discourse/discourse — pull request #302 by kirushik (2013-02-28 20:11:56+00:00)
Title: Better search

Search now supports non-BasicLatin characters.
All required precautions are taken to avoid SQL injections. For example, there is no more direct query concationations, and named parameters substitutions are used instead.
TSQUERY parameters for Postgres FTS are now locale-dependent, so case-insensivity and stemming should work considering `I18n.locale` parameter. (Only `:ru`, `:fr`, `:sv` and `:nl` are currenly recognized, with accordance to existing translations. All other locale values are defaulting TSQUERY parameter to `'english'`.)

This should fix search in most UTF-8 languages (bugs #255, #198 and #209).