Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When updating an index in sphinx.conf is restarting searchd in sphinx always required?

Tags:

sphinx

If I update a resource in my sphinx.conf file I can reindex with --rotate and everything works fine. If I update an index in my sphinx.conf or add a new index --rotate has no effect and I have to restart searchd.

Am I doing this correctly, I feel like --rotate should correctly index the new or modified index configurations.

like image 514
Logan Bailey Avatar asked Sep 21 '11 17:09

Logan Bailey


2 Answers

It depends on your sphinx version. In the latest versions just about anything (except maybe the searchd config section) will work with changing the config file.

Just changing the settings on an individual index, a --rotate indexing of the particular index is enough. If you change the settings of particular index, and dont actully reindex it, searchd probably wont pickup the changes. (because it reads stuff from the index header, not direct from conf file)

I just tested adding a index, and removing a index. both happened with a seemless rotate. Sphinx 2.0.1-beta (r2792)

Prior to 0.9.9-rc1 - a restart would be required for most config file changes.

like image 145
barryhunter Avatar answered Nov 10 '22 14:11

barryhunter


You have to restart searchd when modifying the sphinx.conf file.

Rotate will not effect new index additions to your sphinx.conf file - it reindexes an analogous index of the original. Kind of like having a file and file-copy(1) then swapping them over. If you modify the .conf file its sort of like declaring a brand new index. Thus --rotate does not work if the exact index does not previously exist. See; http://sphinxsearch.com/docs/2.0.1/ref-indexer.html

like image 1
Anthony Avatar answered Nov 10 '22 13:11

Anthony