PDA

View Full Version : Sphinx: does not index words consisting from national symbols


FractalizeR
04 May 2010, 16:18
On my forum after installation Sphinx seem not to index words, that consist from non-latin symbols. My forum is in russian and uses Windows-1251 encoding. Do I need to tune sphinx to do that correctly?

sung
04 May 2010, 17:44
Yes, you need to edit stuff a bit to handle different character encodings. I couldn't say what the exact steps are since I don't use it, but maybe this link would be of some help to you?

http://sphinxsearch.com/faq.html#encoding

FractalizeR
04 May 2010, 22:18
It seems, that I was trying to specify global sql_query_pre, while I needed to put in into each "source" section of configuration file. Will try now.

--------------- Added 1273009150 at 1273009150 ---------------

Yea, now it works.

Yellow Slider
05 Jul 2010, 14:49
where is the configuration file? can you please explain what did you change in order to fix that?

FractalizeR
06 Jul 2010, 08:39
Each source section should contain SET NAMES query like this:

source DBSource
{
type = mysql

#####################################################################
## SQL settings (for 'mysql' and 'pgsql' types)
#####################################################################

sql_host = " . $vBSphinxSearchConfig->dbservername . "
sql_user = " . $vBSphinxSearchConfig->dbusername . "
sql_pass = " . $vBSphinxSearchConfig->dbpassword . "
sql_db = " . $vBSphinxSearchConfig->dbname . "
sql_port = " . $vBSphinxSearchConfig->dbport . " # optional, default is 3306
sql_query_pre = SET NAMES cp1251
sql_query_pre = SET SESSION query_cache_type=OFF

}