2010-09-20 50 views
5

我需要在我的.NET应用程序中使用Windows搜索来搜索某些包含特定关键字的文件。所有这些接缝很容易使用OLE DB连接到Windows 7上的Windows搜索数据存储。Windows搜索使用OLE DB SQL字段

我有我希望的是一个非常容易的问题。我一直在为Windows Search的SQL查询的字段定义进行高低搜索,所以我可以简单地计算出我可以搜索的内容以及我可以在结果集中找到的内容。我没有设法找到这个地方。

任何人都可以指向正确的方向吗?

回答

0

Querying the Index Programmatically是从哪里可以找到相关信息的着陆页。 Microsoft Windows Search 3.x SDK在C#/。NET/Visual Studio中有示例应用程序

+0

嗨Khurram 感谢您的。我已经找到了这些页面,但是我仍然无法找到哪些字段可以实际查询并从SQL语句中返回。我可以找到我可以使用的SQL的语法,因为它是标准的SQL,但没有允许“表”定义,因为缺少对实际查询的更好描述。 任何想法? – 2010-09-20 11:28:19

4

此页面(http://msdn.microsoft.com/sv-se/library/ff518152(v=VS.85).aspx)是一个很好的起点,但请注意,并非所有的列是在Windows的搜索范围内有效(我相信它们不同的其他应用程序,如Windows媒体中心经过反复试验,我发现,在Windows 8.1中搜索的有效列有:

- System.Comment 
- System.Company 
- System.ComputerName 
- System.ContentStatus 
- System.ContentType 
- System.Copyright 
- System.DateAccessed 
- System.DateAcquired 
- System.DateArchived 
- System.DateCompleted 
- System.DateCreated 
- System.DateImported 
- System.DateModified 
- System.DueDate 
- System.EndDate 
- System.FileAttributes 
- System.FileDescription 
- System.FileExtension 
- System.FileFRN 
- System.FileName 
- System.FileOwner 
- System.FlagColor 
- System.FlagColorText 
- System.FlagStatus 
- System.FlagStatusText 
- System.Identity 
- System.Importance 
- System.ImportanceText 
- System.IsAttachment 
- System.IsDeleted 
- System.IsEncrypted 
- System.IsFlagged 
- System.IsFlaggedComplete 
- System.IsIncomplete 
- System.IsRead 
- System.ItemAuthors 
- System.ItemDate 
- System.ItemFolderNameDisplay 
- System.ItemFolderNameDisplay 
- System.ItemFolderPathDisplay 
- System.ItemFolderPathDisplayNarrow 
- System.ItemName 
- System.ItemNameDisplay 
- System.ItemNamePrefix 
- System.ItemParticipants 
- System.ItemPathDisplay 
- System.ItemPathDisplayNarrow 
- System.ItemType 
- System.ItemTypeText 
- System.ItemUrl 
- System.Keywords 
- System.Kind 
- System.KindText 
- System.Language 
- System.MileageInformation 
- System.MIMEType 
- System.Null 
- System.OriginalFileName 
- System.ParentalRating 
- System.ParentalRatingReason 
- System.ParsingName 
- System.Priority 
- System.PriorityText 
- System.Project 
- System.ProviderItemID 
- System.Rating 
- System.RatingText 
- System.Sensitivity 
- System.SensitivityText 
- System.SFGAOFlags 
- System.Shell.OmitFromView 

而且这些特定的搜索字段从日是页(http://msdn.microsoft.com/en-us/library/windows/desktop/ff521715(v=vs.85).aspx):

- System.Search.AutoSummary 
- System.Search.ContainerHash 
- System.Search.Contents 
- System.Search.EntryID 
- System.Search.GatherTime 
- System.Search.HitCount 
- System.Search.Rank 
- System.Search.Store