Answer the question
In order to leave comments, you need to log in
Sphinx - why is it not looking for Russian words with sql_query_pre in the config?
Hello dear experts!
There is this config:
source dbconnect
{
type = mysql
sql_host = localhost
sql_user = user
sql_pass = password
sql_db = dbname
sql_port = 3306
sql_query_pre = SET NAMES utf8
mysql_connect_flags = 32
}
source defaultindex : dbconnect
{
sql_query_pre = UPDATE tbl_sphinx_delta_counter SET \
last_id = (SELECT MAX(id) FROM tbl_product)
sql_query = SELECT id, name, description, keywords, meta_keywords \
FROM tbl_product WHERE \
id <= ( SELECT last_id FROM tbl_sphinx_delta_counter WHERE counter_id=1 )
sql_field_string = name
sql_field_string = description
sql_field_string = keywords_subscription
sql_field_string = meta_keywords
sql_ranged_throttle = 0
}
source deltatindex : dbconnect
{
sql_query = SELECT id, name, description, keywords, meta_keywords \
FROM tbl_product WHERE \
id > ( SELECT last_id FROM tbl_sphinx_delta_counter WHERE counter_id=1 )
sql_field_string = name
sql_field_string = description
sql_field_string = keywords_subscription
sql_field_string = meta_keywords
}
index defaultsearch
{
source = defaultindex
path = /var/lib/sphinxsearch/data/product
wordforms = /var/lib/sphinxsearch/syns.txt
morphology = lemmatize_ru_all
min_word_len = 2
min_prefix_len = 1
html_strip = 1
index_exact_words = 1
expand_keywords = 1
mlock = 0
}
index deltasearch : defaultsearch
{
source = deltatindex
path = /var/lib/sphinxsearch/data/product_delta
}
sql_query_pre = UPDATE tbl_sphinx_delta_counter SET last_id = (SELECT MAX(id) FROM tbl_product)
Answer the question
In order to leave comments, you need to log in
Why the hell do you even have this pre?
look in the end what last id you have.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question