On 01/17/2022 1:24 AM Aki Tuomi aki.tuomi@open-xchange.com wrote:
On 17/01/2022 10:09 Alessio Cecchi alessio@skye.it wrote: So my question is, there is a specific command for switch from an FTS plugin to another or there is a bug in this procedure? Thanks
fts rescan actually just deletes fts indexes, it does not actually rescan anything.
to do full rescan, you need to
doveadm fts rescan -u user doveadm index -u user "*"
To be a bit more exact (at least for flatcurve), doveadm fts rescan deletes all messages above the lowest, non-indexed UID.
Unfortunately, the current Dovecot FTS API does not allow those deleted indices to be indexed programatically, so it requires a separate, external trigger to index the UIDs. So, Aki's command chain is the necessary series of commands that are needed at the current time.
This brings up an old TODO I had in looking into what it would take to trigger indexing via the internal API. Or whether that's even a good idea.
michael