FoolFuuka/Sphinx/Advanced

Search

Runs automatically as root from crontab (crontab -e)

Each board has 3 indexes:

  • Delta = bleeding edge posts - updated every 10 minutes
  • Main = Posts that aren’t inside of ancient - updated daily
  • Ancient = All Posts - updated every month

RARE: Manually create search index - gives error information (can ignore clipped if it is unicode characters too long to fit)

   sudo /usr/bin/rotate <board>_<index> --rotate

To do all delta’s do sudo /usr/bin/rotate *_delta --rotate

In case the OpenVPN IP Changes

The OpenVPN client IP may change upon reconnection. In our case it changed from 10.8.0.10 to 10.8.0.6. As such we have set permissions to allow any ip in the range 10.8.0.% to connect.

UPDATE mysql.user SET host = '10.8.0.%' WHERE host = '10.8.0.10' AND user = 'sphinx';
UPDATE mysql.tables_priv SET host = '10.8.0.%' WHERE Host = '10.8.0.10' AND User = 'sphinx';

mysql&gt; SELECT * FROM mysql.tables_priv WHERE host = ‘10.8.0.10’
    -&gt; ;
+-----------+-------+---------------+----------------+----------------------+---------------------+----------------------------------------------------------------------------------------------------+-------------+
| Host      | Db    | User          | Table_name     | Grantor              | Timestamp           | Table_priv                                                                                         | Column_priv |
+-----------+-------+---------------+----------------+----------------------+---------------------+----------------------------------------------------------------------------------------------------+-------------+
| 10.8.0.10 | asagi | sphinx        | index_counters | [email protected]       | 0000-00-00 00:00:00 | Select,Insert,Update,Delete,Create,Drop,References,Index,Alter,Create View,Show view,Trigger       |             |