README 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. You can get a significant boost in performance using Sphinx Search
  2. instead of your database server to search for users and notices.
  3. <http://sphinxsearch.com/>.
  4. Configuration
  5. -------------
  6. In StatusNet's configuration, you can adjust the following settings
  7. under 'sphinx':
  8. enabled: Set to true to enable. Default true.
  9. server: a string with the hostname of the sphinx server. Default localhost
  10. port: an integer with the port number of the sphinx server. Default 3312
  11. Requirements
  12. ------------
  13. To use a Sphinx server to search users and notices, you also need
  14. to install, compile and enable the sphinx pecl extension for php on the
  15. client side, which itself depends on the sphinx development files.
  16. "pecl install sphinx" should take care of that. Add "extension=sphinx.so"
  17. to your php.ini and reload apache to enable it.
  18. You can update your MariaDB or PostgreSQL databases to drop their fulltext
  19. search indexes, since they're now provided by sphinx.
  20. You will also need a Sphinx server to serve the search queries.
  21. On the sphinx server side, a script reads the main database and build
  22. the keyword index. A cron job reads the database and keeps the sphinx
  23. indexes up to date. scripts/sphinx-cron.sh should be called by cron
  24. every 5 minutes, for example. scripts/sphinx.sh is an init.d script
  25. to start and stop the sphinx search daemon.
  26. Server configuration
  27. --------------------
  28. scripts/gen_config.php can generate a sphinx.conf file listing MySQL
  29. data sources for your databases. You may need to tweak paths afterwards.
  30. $ plugins/SphinxSearch/scripts/gen_config.php > sphinx.conf
  31. If you wish, you can build a full config yourself based on sphinx.conf.sample