<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 9pt; font-family: Verdana,Geneva,sans-serif'>
<p><br /></p>
<div id="signature"> </div>
<p>Can you clarify the piece of code or give an example on how to "Get list of UIDs for all mails in each folder " and how to get the "list of all folder/mailbox" from a *backend input ?<br /><br /></p>
<p><br /></p>
<p id="reply-intro">On 2019-02-17 14:52, Aki Tuomi wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Not really, as the steps outlined by Timo would not get done.<br /><br />Aki<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">On 17 February 2019 at 10:56 Joan Moreau via dovecot <<a href="mailto:dovecot@dovecot.org" rel="noreferrer">dovecot@dovecot.org</a>> wrote:<br /><br /><br />In such case, as long as the API is not upgraded, should <br /><br />doveadm index -A -q \* <br /><br />be considered a replacement of <br /><br />doveadm fts rescan<br /><br />On 2019-02-14 16:24, Timo Sirainen via dovecot wrote:<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Hi, <br /><br />The rescan() function is a bit badly designed. Currently what you could do what fts-lucene does and: <br />- Get list of UIDs for all mails in each folder <br />- If Xapian has UID that doesn't exist -> delete it from Xapian <br />- If UID is missing from Xapian -> expunge the rest of the UIDs in that folder, so the next indexing will cause them to be indexed <br /><br />The expunging of rest of the mails is rather ugly, yes.. A better API would be if backend simply had a way to iterate all mails in the index, preferrably sorted by folder. Then a more generic code could go through them and expunge the necessary mails and index the missing mails. Although not all FTS backends support indexing in the middle. Anyway, we don't really have time to implement this new API soon. <br /><br />I'm not sure if this is a big problem though. I don't think most people running FTS have ever run rescan. <br /><br />On 8 Feb 2019, at 9.54, Joan Moreau via dovecot <<a href="mailto:dovecot@dovecot.org" rel="noreferrer">dovecot@dovecot.org</a>> wrote: <br /><br />Hi, <br /><br />THis is a core problem in Dovecot in my understanding. <br /><br />In my opinion, the rescan in dovecot should send to the FTS plugin the list of "supposedly" indexed emails (UID), and the plugin shall purge the redundant UID (i..e UID present in the index but not in the list sent by dovecot) and send back the list of UID not in its indexes to dovecot, so Dovect can send one by one the missing emails <br /><br />WHat do you think ? <br /><br />-------- Original Message -------- <br /><br />SUBJECT:<br />[grosjo/fts-xapian] `doveadm fts rescan` removes all indices (#15)<br /><br />DATE:<br />2019-02-08 08:28<br /><br />FROM:<br />Leonard Lausen <<a href="mailto:notifications@github.com" rel="noreferrer">notifications@github.com</a>><br /><br />TO:<br />grosjo/fts-xapian <<a href="mailto:fts-xapian@noreply.github.com" rel="noreferrer">fts-xapian@noreply.github.com</a>><br /><br />CC:<br />Subscribed <<a href="mailto:subscribed@noreply.github.com" rel="noreferrer">subscribed@noreply.github.com</a>><br /><br />REPLY-TO:<br />grosjo/fts-xapian <<a href="mailto:reply+0022e607fd2eb3ff93959543198455bc7db5bdd58aa0286b92cf000000011874f1ae92a169ce185221c2@reply.github.com" rel="noreferrer">reply+0022e607fd2eb3ff93959543198455bc7db5bdd58aa0286b92cf000000011874f1ae92a169ce185221c2@reply.github.com</a>><br /><br />doveadm fts rescan -A deletes all indices, ie. all folders and files in the xapian-indexes are deleted. However, according to man doveadm fts, the rescan command should only <br /><br />Scan what mails exist in the full text search index and compare those to what<br />actually exist in mailboxes. This removes mails from the index that have already<br />been expunged and makes sure that the next doveadm index will index all the<br />missing mails (if any). <br /><br />Deleting all indices does not seem to be the intended action, especially as constructing the index anew may take very long on large mailboxes. <br /><br />--<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, view it on GitHub [<a href="https://github.com/grosjo/fts-xapian/issues/15" target="_blank" rel="noopener noreferrer">1</a>], or mute the thread [2].</blockquote>
<br /><br />Links:<br />------<br />[1] <a href="https://github.com/grosjo/fts-xapian/issues/15" target="_blank" rel="noopener noreferrer">https://github.com/grosjo/fts-xapian/issues/15</a><br />[2]<br /><a href="https://github.com/notifications/unsubscribe-auth/ACLmB9OB-7GaKIvhNc8sCgi7KQTrjNnoks5vLScugaJpZM4auCWp" target="_blank" rel="noopener noreferrer">https://github.com/notifications/unsubscribe-auth/ACLmB9OB-7GaKIvhNc8sCgi7KQTrjNnoks5vLScugaJpZM4auCWp</a></blockquote>
</div>
</blockquote>
</body></html>