mysql - Delta Indexing by timestamp in Sphinx -
i attempting setup main+delta index scheme using timestamp field instead of max_doc_id in example in docs.
source main { sql_query_pre = \ replace sph_counter (counter_id, last_update_time) values (1, now()) sql_query = \ select id, filename, absolute_path, last_update_time \ files \ last_update_time <= ( select last_update_time sph_counter counter_id=1) } source delta { sql_query = \ select id, filename, absolute_path, last_update_time \ files \ last_update_time > ( select last_update_time sph_counter counter_id=1) sql_query_pre = }
the indexing , merging works intended, sql_query_pre
main
source never updates last_update_time
in sph_counter
table.
i unsure problem might be.
i running doing following:
re-index delta (every 30 seconds)
and:
merge delta main (every 10 mins) re-index delta (after merge)
am wrong in thinking merge run sql_query_pre
update sph_counter
last_update_time
?
am wrong in thinking merge run sql_query_pre update sph_counter last_update_time?
yes. during merge sphinx not run of queries 'source' indexes. doesnt read information config file, apart getting location of index files.
the simplest way, have delta index update (seperate) counter, sql_query_pre.
then during right after merge, can copy timestamp delta record main record.
Comments
Post a Comment