Windows搜索使用OLE DB SQL字段

7
我需要在我的.NET应用程序中使用Windows搜索来查找包含特定关键字的文件。使用OLE DB连接到Windows 7上的Windows搜索数据存储似乎很容易。
我有一个希望非常简单的问题。我一直在寻找Windows搜索SQL查询的字段定义,以便我可以简单地确定我可以搜索什么以及我可以在结果集中得到什么。但我没有在任何地方找到这个信息。
有人能指点我正确的方向吗?
3个回答

6

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

此外,还有来自此页面的与搜索相关的字段(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

这里还有一个可用列的概述 - Uwe Keim

0

嗨Khurram,感谢你。我已经找到了这些页面,但我仍然找不到可以查询并从我的SQL语句中返回的字段列表。我可以找到可用的SQL语法,这很好因为它是标准的SQL,但无法找到所查询对象的“表”定义(缺乏更好的描述)。有什么想法吗? - Iain Kelwick

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接