Querying the Vista Index using ADO

Interested in searching the index using standard DB queries   It's easy, but I can't find much documentation on it anywhere (please correct me if I'm just missing it).  After searching a lot, I discovered/guessed the connection string and can successfully query the new index.  Very fast, very nice!  I posted about it on my blog (http://www.ariankulp.com/archive/2006/06/14/1315.aspx), but basically, your connection string should be (escape quotes as necessary):

Provider=Search.CollatorDSO.1;Extended Propertes="Application=Windows"

Your FROM clause should reference: systemindex..scope()

For information on available properties/columns, check out this link: http://msdn.microsoft.com/library/default.asp url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_programming/properties.asp

I spent too much time trying to find this info, so I'm sharing it in case it helps anyone else!

-Arian Kulp



Answer this question

Querying the Vista Index using ADO

  • bjorn_coltof

    Hi

    I had a similiar experience when looking for the SDK documentation on WDS 3.0 (the indexing/search engine in Vista). I'd previously written an application making use of the WDS 2.6 API and posted the following question about SDK documentation on the WDS 3.0 API.

    You'll see a comment from someone at MS stating that the WDS 3.0 API docs didn't make it into the Vista beta2 SDK but they are coming. Hopefully sooner rather than later.

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=462273&SiteID=1

    There doesn't seem to be much real 'info/life' in this particular forum and lots of 'noise', the 'Windows Desktop Search' forum has a much better signal to noise ratio and has people from MS replying fairly regularly as well. So you may be better off posting there instead.

    Cheers


  • chr_

    If you are using OLE, make sure that you use the right connection string:

    Provider=Search.CollatorDSO;Extended Properties='Application=Windows';

    You'll find the queryable properties in Windows SDK Help at User Interface | Windows Shell | Shell Reference | Shell Properties. The two properties that you mentioned are definitely there. Maybe it's the connection string. Let me know if that helps. I'm actually working on a new WDS post on my blog (http://www.ariankulp.com). It should be posted in a day or two.

    -Arian


  • itchap

    I am only able to see the contents of System.Title FROM systemindex..scope().

    Is there a way to read other columns from the desktop search like System.DisplayFolder and System.DisplayName

    There are articles out there that show these being selected but I can't get information out of the table. It always throws an exception. "Column Does not Exist".

    Is there new properties of System for these items

    I am working with Vista build 5744 RC2.

    Thanks.



  • DiabboVerdde

    This is really a useful information. Can you explain little bit more ragarding what dll to reference , which query interface to use

    In WDS2.6.5 SDK, i was referencing WDSQuery.dll and using ExecuteQuery().

    Regards
    Hary


  • Querying the Vista Index using ADO