A
A
Alexander N++2014-08-21 09:16:27
Sphinx
Alexander N++, 2014-08-21 09:16:27

Sphinx how to properly set up indexing on the server?

Good people, teach me how to properly set up indexing through cron?
I use the manual version via bash script: in the morning and in the evening.
I run with my hands...

#!/bin/bash
config_path="/etc/sphinx/sphinx.conf";

searchd --stop
indexer --all -c $config_path
searchd --config $config_path

I tried to put it in cron, but somehow it works crookedly.
Maybe you can prescribe something in the sphinx config so that he would already index without me?
I don't use rt indexes and don't know how..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zorruch, 2014-08-21
@zorruch

Crooked - how is it?
When reindexing, the indexer itself sends a signal to the sphinx HUP daemon to reread the configs, so there is no need to restart shpinx.

[email protected]:~# crontab -l 
# m h  dom mon dow   command
0 08 * * * indexer --rotate --all > /dev/null

Will work.
In your case, put your own in the time and path to the config. If the PATH variable is not set in the cron, you can write a cron job like this:
/usr/bin/indexer --rotate --all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question