Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Build complex booleans in Mail with Smart Folders' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Build complex booleans in Mail with Smart Folders
Authored by: paulhagstrom on Nov 18, '07 09:59:33PM

I rediscovered this basic idea recently (and would have posted a hint here about it, if this hint hadn't already been posted), and was trying it out, but I also ran into a problem as well, when you try to include a criterion that requires the use of Spotlight.

My testing was on 10.5, and I haven't actually tried it on 10.5.1, but the basic content of the main hint should work in both (not just in 10.4). The problem I had with Spotlight was this, though:

The technique above is fine for conditions based on headers and flagged/unread status. However, if you include something like "Entire message contains 'omnigroup'" (or, in my case, "MailTags keyword is 'expire'"), then Mail seems to generate an incoherent query for Spotlight. My diagnosis of what is happening was that when you have a Smart Mailbox that has as one of its criteria "is in Another-Smart-Mailbox", opening that superordinate Smart Mailbox results in the generation of a single Spotlight query that collapses together the conditions of the subordinate smart mailbox and the superordinate smart mailbox -- but they are collapsed incorrectly (without any sort of grouping, and disregarding the any/or setting of the subordinate criteria), so you wind up with a query that is more like "msg contains 'omnigroup' or folder=mailing_lists or to=Y or folder=mailing_lists", clearly not what we're after.

I hope that gets fixed, it would be great if it worked with Spotlight too. Although, another thing I have noticed is that smart mailbox criteria that need to use Spotlight are really much slower to run than those that can just work off the headers and flag/unread status -- meaning I usually try to stay away from Spotlight-requiring smart mailboxes anyway.



[ Reply to This | # ]
10.4: Build complex booleans in Mail with Smart Folders
Authored by: paulhagstrom on Nov 18, '07 10:16:42PM

Following up on that last comment (where I said I hadn't tested it under 10.5.1), I just now did -- and it still doesn't work, in the same way I described above.

I had two MailTags keywords, X7 and X30, and two subordinate smart mailboxes, one looking for the X7 keyword and received not within the last 7 days, the other looking for the X30 keyword and received not within the last 30 days. The main smart mailbox looked for messages in one subordinate smart mailbox or in the other subordinate smart mailbox. I should have gotten about 20 messages (since one subordinate mailbox showed 5, the other 20), but instead got 36000 -- anything not within the last 7 or 30 days or bearing either X7 or X30, from what I can tell. It or'ed everything together.



[ Reply to This | # ]