2010-09-20 66 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