Z
Z
zyaleniyeg2016-03-22 17:40:11
Sphinx
zyaleniyeg, 2016-03-22 17:40:11

Sphinx: how to correctly merge index delta?

So we have Sphinx
main main and delta indexes
main index has
sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(ID) FROM samples
than saves the position up to which it has data
delta respectively has
WHERE ID > ( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )
in your sample
, the total plan is as follows
1) Periodically do indexer --rotate delta
2) and at night indexer --merge main delta --rotate
and everything seems to be fine, but at the same time, the value in sph_counter does not shift during merge
and, accordingly, the delta index only grows
how is it better to update the value in sph_counter in this case? remember max(ID) to do, rotate for delta, merge indexes and update the value with handles, or is it somehow possible to entrust the sphinx and I just missed something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2016-03-22
@zyaleniyeg

Well shift SQL request. I'm not sure that you can make pre and post requests with a merge

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question