reindex speed

Issue #269 resolved
s s created an issue

Hello,

We have more than 12'000'000 of mail in archive and our index corrupted. Mail missed for several periods in sphinx index. We decided to recreate whole index. I read your page http://www.mailpiler.org/en/reindex.html Does only these commands recreate whole index ?

/usr/local/bin/indexer delta1 -rotate
/usr/local/bin/indexer -merge main1 delta1 -merge-dst-range deleted 0 0 -rotate

or can we use these steps:

/etc/init.d/rc.searchd stop
rm /var/piler/sphinx/*
indexer --all
/etc/init.d/rc.searchd start
mkdir /tmp/reindex
chown piler. -R /tmp/reindex
cd /tmp/reindex
reindex -a
/usr/local/libexec/piler/indexer.delta.sh
/usr/local/libexec/piler/indexer.main.sh

What is the fastest way to rebuild whole index?

Thank you.

Comments (3)

  1. Janos SUTO repo owner

    Well, reindex -a reads all messages, and puts them to the sph_index table, witing for the indexer cron jobs to process data.

    However if you want to reindex everything, because your sphinx data is corrupted, then perhaps it's easier to remove all sphinx index files, then initialize them with indexer --all, and then run reindex -a.

    If you really have 12 million emails, then don't wait with running the indexer jobs until reindex -a is finished, because you will end up with a pretty fat sph_index table. You'd better to reindex some messages, then run indexing shell scripts, then continue where reindex has left.

  2. Log in to comment