]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-storage: Added "oldestonly" search arg to stop searching after the first non...
authorTimo Sirainen <tss@iki.fi>
Wed, 14 Jan 2015 22:10:56 +0000 (00:10 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 14 Jan 2015 22:10:56 +0000 (00:10 +0200)
commitce763c83d556eea9b74fc63e5d41f3b71a7e72de
treecacf9a8ce3340b6c171a055cc8ccd11c57c76bdd
parent47e90cc0da86de98a8923802a29d844ab5159834
lib-storage: Added "oldestonly" search arg to stop searching after the first non-match.
This parameter works only for doveadm search queries. It's not fully exact
currently, because if mailbox.search_next_update_seq() skips over
non-matching messages we don't stop if the next message matches. So this
parameter is mainly useful for optimization of commands like:

doveadm expunge -u user@domain mailbox inbox savedsince 30d oldestonly

Where the timestamps should be ascending all the time anyway and there's no
point in continuing to search for more mails after the first timestamp is
too high.
src/lib-storage/index/index-search.c
src/lib-storage/mail-search-build.c
src/lib-storage/mail-search-build.h
src/lib-storage/mail-search-register-human.c
src/lib-storage/mail-search.h