Finally fixed: http://hg.dovecot.org/dovecot-1.2/rev/9cccb8617820
On Tue, 2009-11-10 at 15:21 +0800, Patrick Nagel wrote:
So it seems that neither EXPUNGE nor re-SELECT seems to have any "refreshing" effect.
Nikita Koshikov told me to "Try to add :INDEX=MEMORY to location setting".
After my tests above I tried that, and suddenly everything works as expected. It seems logical to have the index of a virtual folder in memory only, since it is generated dynamically anyway, and is outdated before it's even written to disk (at least without some configurable "virtual search result max age" parameter). So maybe the easiest solution is, to imply ':INDEX=MEMORY' when a namespace location is a virtual folder?
That also makes it somewhat slower. Although if you're only searching flags, it doesn't matter much.