On 2/19/09 7:28 PM, "Bob Weingarten" <[email protected]> wrote:
> Hello, > > I am looking for help to perform a search in Entourage 2008 using the > Raw Query feature. I would like to set it up to do a case sensitive > search for a specific letter of the alphabet. I was wondering if > someone could assist me by writing an example of the appropriate > syntax that I would need to enter into the Raw Query text box to > search a field for a single lower case letter or a single upper case > letter. Hi Bob! You've got Entourage 2008 and Leopard, which is the best combination for doing raw queries. Not much has been documented but I'll point you to some useful information. First, have a look at this thread from about a year ago: <http://groups.google.com/group/microsoft.public.mac.office.entourage/browse _thread/thread/a86d541f004e3501>. It should give you an idea of what's happening. Next, I'll point you to Apple's documentation about syntax for a raw query: "Query Expression Syntax" <http://developer.apple.com/documentation/Carbon/Conceptual/SpotlightQuery/C oncepts/QueryFormat.html> So, how should you proceed? First, open the Terminal application found in /Applications/Terminal and type "mdls " with a trailing space. Then locate a cache file that Entourage creates for Spotlight. It doesn't matter which cache file you choose because they all contain the same structure and that's what you're wanting. You'll find the cache files here: ~/Library/Caches/Metadata/Microsoft/Entourage/2008/Main Identity/ Messages/0T/0B/0M/0K/ You'll find caches for: Attachments Contacts Events Messages Notes Tasks Each has its own structure. If you're interested in finding a contact then be sure to use "mdls" on a cache file from the Contacts folder instead of the Messages folder. Drag one of these cache files into the Terminal window and it will fill in the path to the file. Press the return key and you should see something like this: com_microsoft_entourage_accountID = 36 com_microsoft_entourage_author_email_addresses = ( "[email protected]" ) com_microsoft_entourage_categories = ( 7 ) com_microsoft_entourage_completed = 0 com_microsoft_entourage_flagged = 0 com_microsoft_entourage_folderID = 10 com_microsoft_entourage_forwarded = 0 com_microsoft_entourage_has_text_content = 0 com_microsoft_entourage_hasDueDate = 0 com_microsoft_entourage_hasStartDate = 0 com_microsoft_entourage_isFromMailingList = 1 com_microsoft_entourage_message_kind = 1 com_microsoft_entourage_priority = 0 com_microsoft_entourage_projects = ( 0, 0 ) com_microsoft_entourage_recordID = 142867 com_microsoft_entourage_recpient_email_addresses = ( "[email protected]" ) com_microsoft_entourage_redirected = 0 com_microsoft_entourage_repliedTo = 0 com_microsoft_entourage_toEmailAddresses = ( "[email protected]" ) com_microsoft_entourage_toRecipients = ( "Entourage Help Page mailing list" ) com_microsoft_entourage_unread = 1 kMDItemAlternateNames = ( "142867.vRge08Message" ) kMDItemAuthors = ( "William Smith" ) kMDItemContentCreationDate = 2009-02-21 16:18:28 -0600 kMDItemContentModificationDate = 2009-02-21 16:18:29 -0600 kMDItemContentType = "com.microsoft.entourage08.virtual.message" kMDItemContentTypeTree = ( "com.microsoft.entourage08.virtual.message", "public.email-message", "public.message", "public.data", "public.item" ) kMDItemCoverage = "Temporary Items" kMDItemDisplayName = "Re: Raw Query" kMDItemFSContentChangeDate = 2009-02-21 16:18:29 -0600 kMDItemFSCreationDate = 2009-02-21 16:18:29 -0600 kMDItemFSCreatorCode = "" kMDItemFSFinderFlags = 0 kMDItemFSHasCustomIcon = 0 kMDItemFSInvisible = 0 kMDItemFSIsExtensionHidden = 0 kMDItemFSIsStationery = 0 kMDItemFSLabel = 0 kMDItemFSName = "142867.vRge08Message" kMDItemFSNodeCount = 0 kMDItemFSOwnerGroupID = 20 kMDItemFSOwnerUserID = 502 kMDItemFSSize = 2235 kMDItemFSTypeCode = "" kMDItemKeywords = ( " Mailing Lists" ) kMDItemKind = "vrge08_message" kMDItemLastUsedDate = 2009-02-21 16:18:28 -0600 kMDItemRecipients = ( "Entourage Help Page mailing list" ) kMDItemTitle = "Re: Raw Query" kMDItemUsedDates = ( 2009-02-21 00:00:00 -0600 ) You might notice that the above is actually information about this message that I'm typing now. If you look for things like E-mail addresses, dates, etc., then you'll see they are associated to "kMDItem..." words. These are what you'll use in your raw query. Notice that toward the very end of the list is this: kMDItemTitle = "Re: Raw Query" That's the subject of this message. Therefore, if I wanted to do a raw query to search for the subject of messages then I'd do the following in Entourage: 1. Select Edit menu --> Advanced Search... 2. Select either "Match if all/any criteria are met" from the first drop down menu in the Search pane. 3. Select "Raw Query" from the next drop down menu. 4. Enter (kMDItemTitle == "Re: Raw Query") That should return this message and any others you've received with the same subject. If necessary, you may need to be searching "All Messages" instead of just the current folder. Now, you're interested in case sensitivity. Raw queries are already case sensitive. You can test this by searching for: (kMDItemTitle == "Re: RAW Query") You'll notice no results are returned. Refer to the "Query Expression Syntax" page I mentioned above and you can do interesting things like: find (x or y) and z find x in all messages last week find "Yell", "yell", "Do not yell" but not "Yellow" find x whether it's "x" or "X" (case insensitive) Hope this is enough to get you started. -- bill Entourage Help Page <http://entourage.mvps.org/> Entourage Help Blog <http://blog.entourage.mvps.org/> YouTalk <http://nine.pairlist.net/mailman/listinfo/youtalk> Twitter: follow <http://twitter.com/meck> YouTalk mailing list List address: [email protected] List information: http://entourage.mvps.org/support_options/list.html List moderator: [email protected]
