mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Create manticore.conf
This commit is contained in:
parent
74cfd90d60
commit
d3e5e66a10
1 changed files with 112 additions and 0 deletions
112
install/manticore.conf
Normal file
112
install/manticore.conf
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
searchd
|
||||||
|
{
|
||||||
|
# Порты для подключения (аналогично sphinx)
|
||||||
|
listen = 127.0.0.1:9308:http
|
||||||
|
listen = 127.0.0.1:9306:mysql
|
||||||
|
listen = 127.0.0.1:9312 # совместимость с sphinx
|
||||||
|
|
||||||
|
# Логи (аналогично sphinx настройкам)
|
||||||
|
log = /var/log/manticore/searchd.log
|
||||||
|
query_log = /var/log/manticore/query.log
|
||||||
|
pid_file = /var/run/manticore/searchd.pid
|
||||||
|
|
||||||
|
# Настройки производительности (на основе sphinx конфига)
|
||||||
|
read_timeout = 5
|
||||||
|
max_children = 15 # аналог sphinx max_children
|
||||||
|
max_matches = 5000 # аналог sphinx max_matches
|
||||||
|
seamless_rotate = 1
|
||||||
|
preopen_indexes = 0 # как в sphinx
|
||||||
|
unlink_old = 1
|
||||||
|
|
||||||
|
# Настройки для современного Manticore
|
||||||
|
data_dir = /var/lib/manticore
|
||||||
|
binlog_path = /var/lib/manticore/binlog
|
||||||
|
workers = threads
|
||||||
|
binlog_flush = 2
|
||||||
|
rt_flush_period = 3600
|
||||||
|
|
||||||
|
# Лимиты памяти (аналог indexer mem_limit)
|
||||||
|
rt_mem_limit = 256M
|
||||||
|
}
|
||||||
|
|
||||||
|
# Таблица topics (RT индекс на основе оригинального sphinx конфига)
|
||||||
|
table topics
|
||||||
|
{
|
||||||
|
type = rt
|
||||||
|
path = /var/lib/manticore/topics
|
||||||
|
|
||||||
|
# Поля для полнотекстового поиска
|
||||||
|
rt_field = topic_title
|
||||||
|
|
||||||
|
# Атрибуты (аналогично sphinx sql_attr_uint)
|
||||||
|
rt_attr_uint = topic_id
|
||||||
|
rt_attr_uint = forum_id
|
||||||
|
|
||||||
|
# Настройки морфологии и кодировки (точно как в sphinx)
|
||||||
|
morphology = stem_enru
|
||||||
|
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
|
||||||
|
|
||||||
|
# Настройки поиска (аналогично sphinx)
|
||||||
|
min_word_len = 1 # как в sphinx
|
||||||
|
min_stemming_len = 4 # как в sphinx
|
||||||
|
enable_star = 1 # как в sphinx
|
||||||
|
|
||||||
|
# Границы фраз (аналогично sphinx phrase_boundary)
|
||||||
|
phrase_boundary = U+003A, U+002D, U+002E, U+0024 # :, -, ., $
|
||||||
|
phrase_boundary_step = 1
|
||||||
|
|
||||||
|
# HTML обработка
|
||||||
|
html_strip = 1 # как в sphinx
|
||||||
|
|
||||||
|
# Современные настройки Manticore для лучшей производительности
|
||||||
|
min_prefix_len = 0
|
||||||
|
min_infix_len = 0
|
||||||
|
expand_keywords = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Таблица posts (RT индекс на основе оригинального sphinx конфига)
|
||||||
|
table posts
|
||||||
|
{
|
||||||
|
type = rt
|
||||||
|
path = /var/lib/manticore/posts
|
||||||
|
|
||||||
|
# Поля для полнотекстового поиска
|
||||||
|
rt_field = post_text
|
||||||
|
rt_field = topic_title
|
||||||
|
|
||||||
|
# Атрибуты
|
||||||
|
rt_attr_uint = post_id
|
||||||
|
rt_attr_uint = topic_id
|
||||||
|
rt_attr_uint = forum_id
|
||||||
|
|
||||||
|
# Наследуем все настройки от topics
|
||||||
|
morphology = stem_enru
|
||||||
|
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
|
||||||
|
min_word_len = 1
|
||||||
|
min_stemming_len = 4
|
||||||
|
enable_star = 1
|
||||||
|
phrase_boundary = U+003A, U+002D, U+002E, U+0024
|
||||||
|
phrase_boundary_step = 1
|
||||||
|
html_strip = 1
|
||||||
|
min_prefix_len = 0
|
||||||
|
min_infix_len = 0
|
||||||
|
expand_keywords = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Таблица users (RT индекс на основе оригинального sphinx конфига)
|
||||||
|
table users
|
||||||
|
{
|
||||||
|
type = rt
|
||||||
|
path = /var/lib/manticore/users
|
||||||
|
|
||||||
|
# Поля для полнотекстового поиска
|
||||||
|
rt_field = username
|
||||||
|
|
||||||
|
# Атрибуты
|
||||||
|
rt_attr_uint = user_id
|
||||||
|
|
||||||
|
# Настройки морфологии (упрощенные для имен пользователей)
|
||||||
|
morphology = stem_enru
|
||||||
|
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
|
||||||
|
min_word_len = 1
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue