Search
left arrowBack
Sergey Nikolaev

Sergey Nikolaev

January 5, 2011 ・ Sphinx

Copying Sphinx index from different server

One day I had to build one huge index. I couldn't do it on a production box, because there was little space and I decided to build the index in another temporary place and then copy it to the production. Everything was ok except one thing which seems strange to me: Sphinx remembers the place it took exceptions from during indexing and then you can't use the index in another place until you put the exceptions to the same place. So when I copied the huge index and started searchd I got:

using config file '/path/to/sphinx.conf'...
listening on all interfaces, port=3313
listening on all interfaces, port=3317
listening on UNIX socket /path/to/searchd.sock
precaching index 'idx'
WARNING: index 'idx': preload: 'synonyms': failed to open '/mnt/data1/se15.2/synonyms.txt'; NOT SERVING

I had to copy synonyms.txt from it's normal place to /mnt/data1/se15.2/synonyms.txt and after that searchd started fine. I don't know why Sphinx has this logic, just want to warn someone who would like to build an index in one place and then copy it to another.

  • Sphinx