<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>Example from real life</p>
<p><br /></p>
<p>From Roubdcube, I serach "milan" in full message (body & headers)</p>
<p>Logs :</p>
<p>Apr 3 10:24:01 gjserver dovecot[29778]: imap(jom@grosjo.net)<30311><4pACp52FfCF/AAAB>: Query : ( bcc:milan OR body:milan OR cc:milan OR from:milan OR message-id:milan OR subject:milan OR to:milan OR uid:milan )<br />Apr 3 10:24:01 gjserver dovecot[29778]: imap(jom@grosjo.net)<30311><4pACp52FfCF/AAAB>: Query: 81 results in 2 ms</p>
<p>81 results is correct</p>
<p>but Roundcube times out</p>
<p><br /></p>
<p>from command line, I do :</p>
<p>doveadm search -u jom@grosjo.net mailbox inbox text milan</p>
<p>output</p>
<p>doveadm(jom@grosjo.net): Info: Query : ( bcc:inbox OR body:inbox OR cc:inbox OR from:inbox OR message-id:inbox OR subject:inbox OR to:inbox OR uid:inbox ) AND ( bcc:milan OR body:milan OR cc:milan OR from:milan OR message-id:milan OR subject:milan OR to:milan OR uid:milan )<br />doveadm(jom@grosjo.net): Info: Query: 1 results in 1 ms<br />d82b4b0f550d38593644000095331209 847<br />d82b4b0f550d38593644000095331209 1569<br />d82b4b0f550d38593644000095331209 2260<br />d82b4b0f550d38593644000095331209 2575<br />d82b4b0f550d38593644000095331209 2811<br />d82b4b0f550d38593644000095331209 2885<br />d82b4b0f550d38593644000095331209 3038<br />d82b4b0f550d38593644000095331209 3121<br />d82b4b0f550d38593644000095331209 3170</p>
<p>1 - The query is wrong</p>
<p>2 - teh last line "d8...209 3170" gets repeated for ages</p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<div id="signature"> </div>
<p><br /></p>
<p id="reply-intro">On 2019-04-02 16:30, Timo Sirainen 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">On 2 Apr 2019, at 6.38, Joan Moreau via dovecot <<a href="mailto:dovecot@dovecot.org" rel="noreferrer">dovecot@dovecot.org</a>> wrote:
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><br />Further on this topic:<br /><br /><br /><br />When choosing any headers in the search box, dovecot core calls the plugin TWICE (and returns the results quickly, but not immediatly after getting the IDs from the plugins)<br /><br />When choosing the BODY search, dovecot core calls the plugin ONCE (and never returns) (whereas the plugins returns properly the IDs)<br /><br /></blockquote>
<br />If we simplify this, do you mean this calls it once and is fast:<br /><br />doveadm search -u user@domain mailbox inbox body helloworld<br /><br />But this calls twice and is slow:<br /><br />doveadm search -u user@domain mailbox inbox text helloworld<br /><br />And what about searching e.g. subject? :<br /><br />doveadm search -u user@domain mailbox inbox subject helloworld<br /><br />And does the slowness depend on whether there were any matches or not?<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">This is based on GIT version. (previous versions were working properly)</blockquote>
<br />Previous versions were fast? Do you mean v2.3.5?<br /><br /><br /></div>
</blockquote>
</body></html>