Answer the question
In order to leave comments, you need to log in
How to normally run spinx on the server?
I'm doing a search on the site. Windows locale. On it with dancing and a tambourine, but it was possible to launch the sphinx and it was possible to make modules / plugins for it. It's time to move to prod and adventure.
Given:
Sphinx 3.4.1 - located in /root/sphinx-3.4.1
File sphinx.conf - located in /etc/sphinxsearch/sphinx.conf
#
# Minimal Sphinx configuration sample (clean, simple, functional)
#
source virt
{
type = mysql
sql_host = 127.0.0.1
sql_user = тут юзер
sql_pass = тут пароль
sql_db = тут имя базы
sql_port = 3306 # optional, default is 3306
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT ru.virtuemart_product_id as id, ru.product_s_desc, ru.product_desc, ru.product_name, prod.product_sku \
FROM e0bu9_virtuemart_products_ru_ru AS ru INNER JOIN e0bu9_virtuemart_products AS prod ON ru.virtuemart_product_id = prod.virtuemart_product_id
}
index virtuemart
{
source = virt
path = /var/www/ЧАСТЬ_ПУТИ/data/sphinx/data/virt
morphology = stem_enru
charset_table = 0..9, A..Z->a..z, _, a..z, \
U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
blend_chars = +, U+23
ignore_chars = U+AD
min_word_len = 2
html_strip = 1
}
indexer
{
mem_limit = 128M
}
searchd
{
listen = 9312
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/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/www/ЧАСТЬ_ПУТИ/data/sphinx/data
}
~/sphinx-3.4.1/bin# ./searchd --config /etc/sphinxsearch/sphinx.conf
Sphinx 3.4.1 (commit efbcc65)
Copyright (c) 2001-2021, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
listening on all interfaces, port=9312
precaching index 'virtuemart'
precached 1 indexes using 1 threads in 0.0 sec
Answer the question
In order to leave comments, you need to log in
So, the problem was solved by correcting the config. For some reason, the sphinx didn't like the paths I had previously provided for index folding. Decided to follow this answer on the sphinx forum .
Path for indexes /usr/local/sphinx/var/data
Path for logs /usr/local/sphinx/
var / log installation directory).
./indexer --all --config /etc/sphinxsearch/sphinx.conf
./searchd --config /etc/sphinxsearch/sphinx.conf
Strange
Being in the /root/sphinx-3.4.1/bin/ folder, you had to start indexer with './' but you started without it, and start searchd with './'
if it doesn't help, then try with the full path
/ root/sphinx-3.4.1/bin/searchd etc
/root/sphinx-3.4.1/bin/indexer etc
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question