GNOME Bugzilla – Bug 227640
vfolder search with empty components match everything
Last modified: 2002-07-13 18:57:52 UTC
In the default Search->"Create vfolder from search" dialog, there are several empty boxes. Unfortunately it seems that an empty box will match every message. This is bad default behavior because the default for "Execute actions" is "any", so the search will match all messages unless the user fills in every box, or manually deletes the empty boxes. The latter is harder than it should be (at least on my system) because of bug 227639 (all the "remove" buttons are obscured by default). So the solution seems to be that, at least when the searches are being ORed, an empty box should match nothing. Perhaps when searches are being ANDed, an empty box should match everything.
This is the way it was designed to work. empty string == everything.
Well I wouldn't know if it is a design bug or an implementation bug. But it is very confusing the way it is now (I think I'm up to date now because I just installed the latest development snapshot) because, given the default "if any criteria are met", the user has to delete 3 boxes just to do a simple search. Instead, empty criteria should not count towards the results of a search.
What it does is create a vfolder from your *current* search. You obviously haven't searched for anything, therefore it just creates a rule that matches everything.
I think there has been some miscommunication. Suppose in v1.1.0.99 I click on "Advanced..." and then put "Fred" in the "Sender contains" box and "football" in the "subject contains" box. What should this do by default? It should either match all messages sent by Fred about football, or all messages either sent by Fred or about football. Instead, this search matches all messages. Clearly no user would intend to do this, and it is very unobvious that an empty box will match all messages. It seems clear to me that the correct behavior would be for an empty box simply not to count in the search. If all boxes are empty, then the search can match all messages.
unfortunately, internally we use an empty string to match all and we've already explained to users wanting to make vfolders/filters that match all messages to use an empty string to match all messages... this means we're pretty much committed. No going back now. (filters, vfolders, and searches share a liot of code, for the UI and for their backends).