Created
August 3, 2011 20:36
-
-
Save AV4TAr/1123696 to your computer and use it in GitHub Desktop.
sphinx.com delta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source main | |
{ | |
# ... | |
sql_query_pre = SET NAMES utf8 | |
sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(id) FROM documents | |
sql_query = SELECT id, title, body FROM documents \ | |
WHERE id<=( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 ) | |
} | |
source delta : main | |
{ | |
sql_query_pre = SET NAMES utf8 | |
sql_query = SELECT id, title, body FROM documents \ | |
WHERE id>( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 ) | |
} | |
index main | |
{ | |
source = main | |
path = /path/to/main | |
# ... all the other settings | |
} | |
# note how all other settings are copied from main, | |
# but source and path are overridden (they MUST be) | |
index delta : main | |
{ | |
source = delta | |
path = /path/to/delta | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment