А S.T.A.L.K.E.R. в поиске ищет?Всем привет.
Не индексирует слово Дэдпул 2, такое ощущение что с буквой "э" какие то проблемы, кто сталкивался ?
Всем привет.
Не индексирует слово Дэдпул 2, такое ощущение что с буквой "э" какие то проблемы, кто сталкивался ?
source torrentpier
{
type = mysql
sql_host = localhost
sql_user = torrentpier
sql_pass = parol
sql_db = torrentpier
sql_port = 3306 # optional, default is 3306
}
source topics: torrentpier
{
sql_query = \
SELECT topic_id, forum_id, topic_title \
FROM bb_topics \
WHERE topic_id BETWEEN $start AND $end
sql_query_range = SELECT MIN(topic_id), MAX(topic_id) FROM bb_topics
sql_range_step = 100000
sql_attr_uint = forum_id
sql_ranged_throttle = 50
}
source posts: torrentpier
{
sql_query = \
SELECT pt.post_id, pt.post_text, t.topic_title, t.topic_id, t.forum_id \
FROM bb_posts_text pt \
LEFT JOIN bb_topics t on pt.post_id = t.topic_first_post_id \
WHERE pt.post_id BETWEEN $start AND $end
sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM bb_posts_text
sql_range_step = 100000
sql_attr_uint = topic_id
sql_attr_uint = forum_id
sql_ranged_throttle = 50
}
source users: torrentpier
{
sql_query = \
SELECT user_id, username \
FROM bb_users \
WHERE user_id BETWEEN $start AND $end
sql_query_range = SELECT 1, MAX(user_id) FROM bb_users
sql_range_step = 1000
}
index topics
{
morphology = stem_enru, Soundex, Metaphone
charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42C->U+430..U+44C, U+42E..U+42F->U+44E..U+44F, U+430..U+44C, U+44E..U+44F, U+0401->U+0435, U+0451->U+0435, U+042D->U+0435, U+044D->U+0435
expand_keywords = 1
min_prefix_len = 0
min_infix_len = 0
min_word_len = 1
min_stemming_len = 4
index_exact_words = 1
html_strip = 1
source = topics
path = /var/lib/sphinxsearch/data/topics
}
#index posts: topics
#{
# path = /var/lib/sphinxsearch/data/posts
# source = posts
#}
index users: topics
{
path = /var/lib/sphinxsearch/data/users
source = users
}
indexer
{
mem_limit = 128M
}
searchd
{
listen = 9312
listen = 9306:mysql41
log = /var/lib/sphinxsearch/log/searchd.log
query_log = /var/lib/sphinxsearch/log/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/sphinxsearch/searchd.pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = /var/lib/sphinxsearch/data
}
Спасибо !!!Делюсь своим конфигом, который находит данное название. Сфинкс установлен из репозитория ubuntu 20, имеет версию 2.2.11
Код:source torrentpier { type = mysql sql_host = localhost sql_user = torrentpier sql_pass = parol sql_db = torrentpier sql_port = 3306 # optional, default is 3306 } source topics: torrentpier { sql_query = \ SELECT topic_id, forum_id, topic_title \ FROM bb_topics \ WHERE topic_id BETWEEN $start AND $end sql_query_range = SELECT MIN(topic_id), MAX(topic_id) FROM bb_topics sql_range_step = 100000 sql_attr_uint = forum_id sql_ranged_throttle = 50 } source posts: torrentpier { sql_query = \ SELECT pt.post_id, pt.post_text, t.topic_title, t.topic_id, t.forum_id \ FROM bb_posts_text pt \ LEFT JOIN bb_topics t on pt.post_id = t.topic_first_post_id \ WHERE pt.post_id BETWEEN $start AND $end sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM bb_posts_text sql_range_step = 100000 sql_attr_uint = topic_id sql_attr_uint = forum_id sql_ranged_throttle = 50 } source users: torrentpier { sql_query = \ SELECT user_id, username \ FROM bb_users \ WHERE user_id BETWEEN $start AND $end sql_query_range = SELECT 1, MAX(user_id) FROM bb_users sql_range_step = 1000 } index topics { morphology = stem_enru, Soundex, Metaphone charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42C->U+430..U+44C, U+42E..U+42F->U+44E..U+44F, U+430..U+44C, U+44E..U+44F, U+0401->U+0435, U+0451->U+0435, U+042D->U+0435, U+044D->U+0435 expand_keywords = 1 min_prefix_len = 0 min_infix_len = 0 min_word_len = 1 min_stemming_len = 4 index_exact_words = 1 html_strip = 1 source = topics path = /var/lib/sphinxsearch/data/topics } #index posts: topics #{ # path = /var/lib/sphinxsearch/data/posts # source = posts #} index users: topics { path = /var/lib/sphinxsearch/data/users source = users } indexer { mem_limit = 128M } searchd { listen = 9312 listen = 9306:mysql41 log = /var/lib/sphinxsearch/log/searchd.log query_log = /var/lib/sphinxsearch/log/query.log read_timeout = 5 max_children = 30 pid_file = /var/run/sphinxsearch/searchd.pid seamless_rotate = 1 preopen_indexes = 1 unlink_old = 1 workers = threads # for RT to work binlog_path = /var/lib/sphinxsearch/data }
К сожалению не ищет ...Делюсь своим конфигом, который находит данное название. Сфинкс установлен из репозитория ubuntu 20, имеет версию 2.2.11
Код:source torrentpier { type = mysql sql_host = localhost sql_user = torrentpier sql_pass = parol sql_db = torrentpier sql_port = 3306 # optional, default is 3306 } source topics: torrentpier { sql_query = \ SELECT topic_id, forum_id, topic_title \ FROM bb_topics \ WHERE topic_id BETWEEN $start AND $end sql_query_range = SELECT MIN(topic_id), MAX(topic_id) FROM bb_topics sql_range_step = 100000 sql_attr_uint = forum_id sql_ranged_throttle = 50 } source posts: torrentpier { sql_query = \ SELECT pt.post_id, pt.post_text, t.topic_title, t.topic_id, t.forum_id \ FROM bb_posts_text pt \ LEFT JOIN bb_topics t on pt.post_id = t.topic_first_post_id \ WHERE pt.post_id BETWEEN $start AND $end sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM bb_posts_text sql_range_step = 100000 sql_attr_uint = topic_id sql_attr_uint = forum_id sql_ranged_throttle = 50 } source users: torrentpier { sql_query = \ SELECT user_id, username \ FROM bb_users \ WHERE user_id BETWEEN $start AND $end sql_query_range = SELECT 1, MAX(user_id) FROM bb_users sql_range_step = 1000 } index topics { morphology = stem_enru, Soundex, Metaphone charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42C->U+430..U+44C, U+42E..U+42F->U+44E..U+44F, U+430..U+44C, U+44E..U+44F, U+0401->U+0435, U+0451->U+0435, U+042D->U+0435, U+044D->U+0435 expand_keywords = 1 min_prefix_len = 0 min_infix_len = 0 min_word_len = 1 min_stemming_len = 4 index_exact_words = 1 html_strip = 1 source = topics path = /var/lib/sphinxsearch/data/topics } #index posts: topics #{ # path = /var/lib/sphinxsearch/data/posts # source = posts #} index users: topics { path = /var/lib/sphinxsearch/data/users source = users } indexer { mem_limit = 128M } searchd { listen = 9312 listen = 9306:mysql41 log = /var/lib/sphinxsearch/log/searchd.log query_log = /var/lib/sphinxsearch/log/query.log read_timeout = 5 max_children = 30 pid_file = /var/run/sphinxsearch/searchd.pid seamless_rotate = 1 preopen_indexes = 1 unlink_old = 1 workers = threads # for RT to work binlog_path = /var/lib/sphinxsearch/data }
indexer --rotate --all --config /etc/sphinxsearch/sphinx.conf
sudo apt-get install mysql-client unixodbc libpq5
sudo apt-get install sphinxsearch
sudo searchd -c /etc/sphinxsearch/sphinx.conf
Sphinx searchd daemon can be started/stopped using service command:
sudo service sphinxsearch start
для автозапуска:
sudo nano /etc/default/sphinxsearch
переключи:
START=yes
управление сервисом:
# service sphinxsearch start
# service sphinxsearch reload
# service sphinxsearch restart
sudo systemctl status sphinxsearch.service
Откроем для редактирования новый файл будущего скрипта для управления запуском searchd:
sudo nano /usr/local/sbin/systemd-searchd.sh
Копируем в редактор следующий текст скрипта:
#!/bin/sh
searchd -c /etc/sphinxsearch/sphinx.conf
Устанавливаем права на запуск скрипта:
sudo chmod +x /usr/local/sbin/systemd-searchd.sh
В crontab -e
@reboot /usr/local/sbin/systemd-searchd.sh
*/15 * * * * root indexer --rotate topics /etc/sphinxsearch/sphinx.conf > /dev/null 2>&1
*/30 * * * * root indexer --rotate --all --config /etc/sphinxsearch/sphinx.conf > /dev/null 2>&1