HighTechTalks DotNet Forums  

Custom WDS Rules

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Custom WDS Rules in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Tim Haughton
 
Posts: n/a

Default Custom WDS Rules - 12-22-2007 , 05:46 PM






I have these requirements of WDS for a project:

1) I need to be able to add a new location to the user scope rules for WDS
so that it indexes an application specific folder. This folder, at the
moment, contains only text files.

2) This folder *should not* be included in any of Vista's searches from the
shell. For example, if a user does Windows+F, the shell will not search my
app specific locations.

3) I need to be able to query WDS for results from my app specific folder
only.

Here is what I have so far:

private static void SetUpWDS()
{
CSearchManager searchManage = new CSearchManager();
CSearchCatalogManager catalogManager =
searchManage.GetCatalog("SystemIndex");

CSearchCrawlScopeManager crawlScopManager =
catalogManager.GetCrawlScopeManager();

crawlScopManager.RevertToDefaultScopes();

string indexablePath = @"file:///" +
ApplicationConfig.IndexableFolder;

if (crawlScopManager.IncludedInCrawlScope(indexablePa th) == 0)
{
crawlScopManager.AddUserScopeRule(@"file:///" +
ApplicationConfig.IndexableFolder, 1, 1, 0);
crawlScopManager.SaveAll();
}
}


So, rather than use the system index, can I create my own? Are there any
obvious solutions I'm missing?

Cheers,

Tim

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.