sphinxsearchHow can I use SphinxSearch to rotate my index seamlessly?
SphinxSearch provides the ability to rotate your index seamlessly via its Delta-Indexing feature. Delta-Indexing allows you to create a new index from the changes in your source data, without having to re-index the entire dataset. This allows you to keep your search index up-to-date without having to take your search engine offline.
Here is an example of how to use Delta-Indexing to rotate your index:
# Create a main index
index main
{
source = main_source
path = /var/lib/sphinxsearch/data/main
...
}
# Create a delta index
index delta
{
source = delta_source
path = /var/lib/sphinxsearch/data/delta
...
# Specify the main index as the parent index
# for the delta index
parent = main
}
Once the delta index is created, you can use the indexer
command to update the main index with the changes in the delta index.
indexer --rotate --merge main delta
This command will merge the changes in the delta index into the main index, and then rotate the main index so that it is up-to-date.
Code explanation
index main
: Creates a main index from a source data set.index delta
: Creates a delta index from a source data set.parent = main
: Specifies that the delta index is a child of the main index.indexer --rotate --merge main delta
: Merges the changes in the delta index into the main index, and then rotates the main index so that it is up-to-date.
Helpful links
More of Sphinxsearch
- How do I integrate Sphinxsearch with Yii2?
- How do I configure SphinxSearch using YAML?
- How can I use Sphinx Search to generate word forms?
- How can I use Sphinx Search to weigh my search results?
- How do I use the word count ranker in SphinxSearch?
- How do I use SphinxSearch to count words in a text?
- How do I use SphinxSearch with XMLPipe2?
- How can I use Sphinx to search for words in a specific form?
- How do Sphinx Search and Solr compare for software development?
See more codes...