I've read the Sphinx documentation and various resources, but I am confused about the process of maintaining main and delta indexes. Please let me know if this is correct:
Have a table that partitions the search index by
last_update_time(NOT id as in the tutorial http://sphinxsearch.com/docs/1.10/delta-updates.html)Update the delta index every 15 minutes. The delta index only grabs records that have been updated >
last_update_time:indexer --rotate --config /opt/sphinx/etc/sphinx.conf deltaUpdate the main index every hour by merging delta using:
indexer --merge main delta --merge-dst-range deleted 0 0 --rotate
The pre query SQL will update last_update_time to NOW(), which re-partitions the indexes
Confusion: Will the merge run the pre query SQL?
After the main index is updated, immediately update the delta index to clean it up:
indexer --rotate --config /opt/sphinx/etc/sphinx.conf delta
EDIT: How would deletion of records even work? Since the delta index would contain deleted records, records would only be removed from search queries after the delta index was merged into main?