%PDF- %PDF-
| Direktori : /proc/self/root/proc/self/root/etc/ansible/roles/sphinx/templates/ |
| Current File : //proc/self/root/proc/self/root/etc/ansible/roles/sphinx/templates/sphinx.conf.j2 |
#!/usr/bin/php
# {{ ansible_managed }}
# Minimal Sphinx configuration for Bitrix
#
# Include site search db
<?php
$includeConfig = "\n\n";
$confDir = "{{ sphinx_inx_dir }}";
if(is_dir($confDir))
{
if($dh = opendir($confDir))
{
while(($file = readdir($dh)) !== false)
{
if($file == "." || $file == "..")
continue;
$includeConfig .= file_get_contents($confDir.'/'.$file)."\n\n";
}
closedir($dh);
}
}
echo $includeConfig;
?>
index testrt
{
type = rt
rt_mem_limit = 128M
path = /var/lib/sphinx/testrt
rt_field = title
rt_field = content
rt_attr_uint = gid
}
searchd
{
listen = {{ sphinx_general_listen }}
listen = {{ sphinx_mysqlproto_listen }}:mysql41
log = {{ sphinx_main_log }}
query_log = {{ sphinx_query_log }}
pid_file = {{ sphinx_run_file }}
binlog_path = {{ sphinx_lib_dir }}
read_timeout = 5
max_children = 30
max_matches = 1000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_max_log_size = 512M
# 2 - flush every transaction, sync every second. Good performance, and every committed transaction is guaranteed to be saved in case of daemon crash.
# 1 - flush and sync every transaction. Worst performance, but every committed transaction data is guaranteed to be saved
binlog_flush = 2
rt_flush_period = 3600
}
# {{ sphinx_type }}
{% if sphinx_type == '21' %}
indexer
{
lemmatizer_cache = 128M
lemmatizer_base = /etc/sphinx/bx/dicts/
}
{% else %}
indexer
{
lemmatizer_cache = 128M
}
common
{
lemmatizer_base = /usr/share/sphinx/dicts
}
{% endif %}