I can enable logging for Windows Search through the registry (see below), but this only captures queries sent through the default user-interface for Windows Search. I want to capture queries used by Outlook 2003, Outlook 2007, OneNote 2007 or any other application that accesses the SystemIndex.
HKEY_CURRENT_USER\Software\Microsoft\Windows Desktop Search\DS\WriteLog[DWORD]0|1
What I want to do is analyze these queries in order get a better understanding on how to build queries for my personal search utility (WinForms/WPF/ADO.NET/OleDb) that I use to search my code library (physical file system).
How would I track any and all queries performed on the SystemIndex of Windows Search?
If you really want to capture all accesses to the SystemIndex, that would be quite the tall order, as there are multiple ways it can be accessed:
If we ignore that for a bit and focus on your other goal:
Then I would look into the ISearchQueryHelper Interface.
One method of that interface is GenerateSQLFromUserQuery, which may help you out.