[Dovecot] Search for (any of) multiple terms slow

Timo Sirainen tss at iki.fi
Thu Aug 14 05:21:39 EEST 2008


On Aug 13, 2008, at 8:52 PM, Patrick Nagel wrote:

>> Requires a lot
>> more complexity to the code though..
>
> Couldn't Dovecot just search the index with each single word (as it  
> does
> now without OR), and then merge the results, filtering out double  
> UIDs?
> This is probably not the most efficient way to solve this, but it  
> would be
> definitely *much* faster than not using the indexes at all - and  
> doesn't
> sound too complex to me.

It would be nice to allow the FTS backend to handle as much of this as  
possible. For example with Lucene you could merge several AND/ORs into  
a single query. But maybe it's not worth the trouble to do all that  
complexity. But at least the OR-only search could be a special case  
where all the words are sent to backend. In a mixed AND/OR query then  
it could do several queries and merge the results. And sure, it's not  
*that* complex but it'll require a few hours of work.

> Are there any other not-yet-implemented SEARCH features that don't  
> work
> with the FTS plugin?

Shouldn't be. Or perhaps things related to header searches could be  
better optimized.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080813/6d843c88/attachment.bin 


More information about the dovecot mailing list