使用OLE DB SQL字段进行Windows搜索

Iai*_*ick 6 .net c# windows oledb search

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

我有我希望的一个非常简单的问题.我一直在搜索Windows搜索的SQL查询的字段定义的高低,所以我可以简单地找出我可以搜索的内容以及我可以在结果集中找到的内容.我无法在任何地方找到它.

谁能指出我正确的方向?

Iai*_*ick 6

好.我终于找到了我可能需要的所有元素.他们位于这里:

http://msdn.microsoft.com/sv-se/library/ff518152(v=VS.85).aspx

几乎无法提及


Gur*_*ruJ 5

此页面(http://msdn.microsoft.com/sv-se/library/ff518152(v=VS.85).aspx)是一个很好的起点,但是请注意,并非所有列在Windows搜索中都有效上下文(我假设它们与其他应用程序(例如Windows Media Center)不同。通过反复试验,我发现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
Run Code Online (Sandbox Code Playgroud)

另外,此页面中的以下特定于搜索的字段(http://msdn.microsoft.com/zh-cn/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
Run Code Online (Sandbox Code Playgroud)