User Tools

Site Tools


Translations of this page:



new_rotation_sphinx

Sphinx search

Basically script uses mysql to search DB, but with large DB mysql is too slow. It also doesn't use morphology.

Sphinx (sphinxsearch.com) - is an open source full text search server, designed from the ground up with performance, relevance (aka search quality), and integration simplicity in mind. It faster then Mysql and deliver better quality of results.

Workflow:

  • You have a DB with galleries
  • Sphinx creates a “zip” version of your DB
  • SmartCJ queries Sphinx to search for keywords
  • Sphinx does a search and returns results
  • SmartCJ outputs results

Setup:

  • Ask admin to setup sphinx
  • switch from regular search to Sphinx (Rotation - Settings - Site Search )
  • ask admin to add scj index into sphinx config. (Copy config from Rotation - Settings - Site Search config example )
  • Run indexer (or ask admin to do it)
     indexer --all --rotate 
  • In Rotation - Settings - Site search make sure you added Sphinx settings (Sphinx Host, Port, index name - add you real data, ask admin if you don't know it)

That's it.

Note if you change DB (add\remove content) - please, run indexer every day to keep it's base up to date.

Add to cron something like (ask admin)

indexer --all --rotate

Sphinx config

Please, open Rotation Settings - Site Search , change search engine to sphinx and the script will generate a config for you.

Sphinx Delta index

If you have a large DB it might take time to reindex the entire DB, so you can use

Now you have to add a new crontab task that will reindex new parts

indexer --rotate delta

Now you have to add 'delta' into Sphinx Delta Index (Rotation settings)

once a day you can marge main index and delta index

indexer --rotate --merge your_name_index delta

That's it.

Sphinx and slave sites

Slave site automatically use master's search settings. No need to do anything extra at slave sites.

new_rotation_sphinx.txt · Last modified: 2025/02/15 11:34 by admin