Arian Kulp's Blog
opinion, insight, and occasional code

Windows Desktop Search (WDS) Properties

Wednesday, November 15, 2006 4:26 PM

If you've been trying to work with Windows Desktop Search 3.0 on XP or Vista and have been frustrated about which properties actually work, I've compiled two list.  Starting with the complete list of Shell API properties from MSDN, I ran them through a quick query app to see which error'd out.  The list of good properties is here:

http://www.ariankulp.com/downloads/WindowsShellOLEProperties.txt

For the list of shell API properties missing from the OLE DB interface, look here:

 http://www.ariankulp.com/downloads/WindowsShellOLE-MissingProperties.txt

There are a good number of working ones.  I have no idea why the others don't work.  I have also learned that for the search index, you don't need the scope() element (link) -- just use FROM SYSTEMINDEX.  Also, you don't need to use the double quotes around each column name, though I noticed that if you omit the quotes your result set will reference all column names in upper case.  For many uses this distinction won't matter, but it's worth mentioning.

I've been doing some work on search for an upcoming article, and I'm still excited about it.  Response time is quite fast.  New files get indexed quickly (though that's not really the same thing), and overall it's very useable.  I'd like to see some applications forego a file requester dialog in favor of some intelligent search.  The only downside is that it only searches local folders.  If there's a way to index network drives I haven't found it yet.


For mcse certification, it always matters if you have or have not done your comptia certification. Although in microsoft training, prior experience is not important but a history of mcsa boot camp does sound impressive on your resume.



Feedback

# re: Windows Desktop Search (WDS) Properties

Arian,
In WDS 2.6.5 a dll named WDSQuery.dll exposed ExecuteQuery() to query the indexes and the function used to return recordset. In WDS 3.0, we are able to query the indexes using the OleDb approach, but, is there anyother interface exposed by a dll using which we can query the indexes? (Background: We are developing a VB.NET application to search a set of files in a predefined location. Since we wanted to have some more control on WDS, we wanted to follow the interface approach rather than, the OleDb approach.)

Thanks in advance.. expecting your reply at the earliest. 11/22/2006 4:24 AM | shree

# re: Windows Desktop Search (WDS) Properties

There is a COM-based interface with WDS 3.0 as well. What additional control are you looking for though? You can specify a predefined location to restrict your search using the OLE DB interface (to only search a folder and its subfolders). Check out my previous entry which discusses how to scope to one directory, or a directory and its subdirectories. It's quite easy.

As for COM-based queries, I haven't worked with them. The Windows SDK help file includes information on all of the interfaces, structures, and enumerations. Most likely the basics haven't changed much. Have you given it a try yet? 11/22/2006 11:21 AM | Arian

# re: Windows Desktop Search (WDS) Properties

Some help requested before I'm doing more research on WDS 3.0:
I am looking for a search engine to access xml-files in a predefined folder.
The search should return the node-name/path within the xml-file where a match is found, and also it should be possible to specify exclude-words in the search (f.ex. excluding 'Microsoft' when searching 'micro' etc.)
Is it possible to accomplish these tasks with WDS 3.0, or do you have suggestions for other search engines to integrate in my application.

Thank you, hoping for an early answer. 2/19/2007 7:30 AM | apost

# re: Windows Desktop Search (WDS) Properties

We're using PrimaryDate in WDS 2.6.6 but doesn't work in 3.0. Is there any way of having a common component that works with both 2.6 and 3? 3/1/2007 8:13 PM | bpost

# re: Windows Desktop Search (WDS) Properties

I'm not sure which field that was. Here are the obvious date-related fields in WDS 3.0 (their actual columns names anyway).
System.DateAccessed
System.DateAcquired
System.DateArchived
System.DateCompleted
System.DateCreated
System.DateImported
System.DateModified

If you use the query-based interface, you aren't guaranteed that changes won't break your code. The standard syntax (non-SQL) is a little safer. I think you may need an abstracted search query layer for 2.* and 3.* versions to be optimal. 3/1/2007 9:26 PM | Arian

# re: Windows Desktop Search (WDS) Properties

Are you aware of any API calls to get the EntryID and StoreID for an Outlook item/record that is returned in a Search 3.1 results set? 3/27/2007 8:09 AM | Steve

# re: Windows Desktop Search (WDS) Properties

There is a COM-based interface with WDS 3.0 as well. What additional control are you looking for though? You can specify a predefined location to restrict your search using the OLE DB interface (to only search a folder and its subfolders). Check out my previous entry which discusses how to scope to one directory, or a directory and its subdirectories. It's quite easy.

As for COM-based queries, I haven't worked with them. The Windows SDK help file includes information on all of the interfaces, structures, and enumerations. Most likely the basics haven't changed much. Have you given it a try yet? 4/22/2007 9:10 PM | 数据恢复

# re: Windows Desktop Search (WDS) Properties

In WDS 3.0, we are able to query the indexes using the OleDb approach, but, is there anyother interface exposed by a dll using which we can query the indexes? 5/4/2007 9:52 PM | 硬盘数据恢复

# re: Windows Desktop Search (WDS) Properties

Check out my newest post with materials from a WDS presentation I just did.

The short answer is no (as far as I know). You can't directly execute queries against the engine. There is an SDK which you can use to manage the query engine, and it helps you to integrate user queries (Natural Query Syntax and Advanced Query Syntax), but in the end you go against the data source. With WDS 2.x I understand that there was an ExecuteQuery() method in the DesktopSearch object (or something like that), but now it's a bit more direct. Is there anything that you need help with? 5/5/2007 12:01 AM | Arian



Comments have been closed on this topic.