Wow, I can't believe howe much trouble I've had getting search to work in Windows Vista! Based on a quote from MSDN:
"You can use new Windows Vista APIs to query items in the Windows Search Engine. Your application can use the OLEDB/ADO from managed or unmanaged code to issue queries using a SQL-like syntax. In return, your application receives an OLEDB Recordset where the columns correspond to properties in the Windows Metadata System, for example, System.Photo.FNumber." -- http://msdn.microsoft.com/windowsvista/prodinfo/what/discoverable/default.aspx
I cannot find documentation on this feature
anywhere! I have a sample from the December CTP that uses a weird OLE DB provider (USearch.CollatorDSO.1), but aside from one reference on an MSDN forum posting, no one is talking about this! There are plenty of options on using Indexing Server for ASP.NET applications, and samples for the MSN or Google Desktop Search, but what about the new-fangled Windows Search Engine? It's supposed to be a big part of the OS, but no mention of that I can find. I can't imagine that they've backed off of it. I think that you can programmatically do object-based queries, but as quoted above, it's supposed to be SQL-queryable as well. It's pretty frustrating. I'm about ready to give up. If I try to use the standard Indexing Service, I need to create a catalog and add folders. I don't think that's the same thing (MSIDXS provider) as its been around since Windows 2000 or so. If anyone knows anything, let me know!
UPDATE (6/15): I got it working! Such a simple change, but how to figure it out? After some guessing, I discovered that it should be "Search.CollatorDSO.1" (note the missing "U"). There is also an extended property. Here's the complete connection string:
Provider=Search.CollatorDSO.1;Extended Propertes="Application=Windows"
Those quotes may need to be escaped, depending on your environment. I'm so excited (yes, it doesn't take much!). You should use systemindex..scope() as the FROM clause, and some columns include System.Title and System.Size. Have fun!
UPDATE (6/16): One more update! I found the link to all system properties (remember that you can create custom ones too...). If you want to know what you can query, here's
the list (actually, the correct list can only be found offline in the Windows SDK Beta 2 at:
User Interface->Windows Shell->Shell Reference->Shell Properties). Very impressive so far! I really think this can enable some cool stuff. I'll post some sample code and a few more thoughts soon.
UPDATE (7/5): It looks like someone at Microsoft has finally gotten a few resources out there on Windows Desktop Search 3.0 (the official name for all of this). You can even download it for Windows XP and 2000! Check out
Searching for Windows Vista? Unfortunately, it clears up something I had been trying without success. It's read-only. This is disappointing, especially now that WinFS will no longer provide that great relational DB<->file system mapping. Oh well. Also, my property list in my original post is no longer correct. I've fixed that.
FINAL UPDATE (7/11): The above link has a part two regarding search predicates for Vista. Read more
here. I plan on rolling all of this into a new link when I have a few minutes!
posted @ Wednesday, June 14, 2006 4:08 PM