Answer the question
In order to leave comments, you need to log in
How to make sphinx morphology work on utf8?
I want to use real-time sphinx index. Below is the config:
index rt_compare
{
type = rt
rt_mem_limit = 32M
charset_type = utf-8
path = /var/lib/sphinx/rt_compare
morphology = stem_enru
rt_field = content
rt_attr_string = content
rt_attr_uint = gid
min_word_len = 3
}
searchd
{
listen = 9312
listen = 9306:mysql41
log = /var/log/sphinx/searchd.log
query_log = /var/log/sphinx/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/sphinx/searchd.pid
max_matches = 1000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = /var/lib/sphinx/
collation_server = utf8_general_ci
}
$pdo = new PDO("mysql:host=127.0.0.1;port=9306;charset=UTF8", "", "");
$r = $pdo->exec("SET NAMES 'utf8'");
$r = $pdo->exec("SET CHARACTER_SET_RESULTS=utf8");
$r = $pdo->query("CALL KEYWORDS('машины', 'rt_compare')" );
while( $row = $r->fetch() ){
print_r( $row );
}
Answer the question
In order to leave comments, you need to log in
If you want to transfer to a new hosting. Then you had to create a new database for the site and a user with a password to maintain the same database and make changes to the file that is responsible for the database settings
Incorrect login/password/server/dbname. And yes, stop using deprecated functions .
Everything worked when I installed the beta, manually added lemmatizer_base to the directory where I previously placed the ru.pak dictionary.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question