开发者

Windows Search using OLE DB SQL Fields

开发者 https://www.devze.com 2023-01-17 07:08 出处:网络
I need to use Windows Search within my .NET application to search for certain file开发者_JS百科s containing certain keywords. All of this seams easy enough using OLE DB to connect to the Windows Searc

I need to use Windows Search within my .NET application to search for certain file开发者_JS百科s containing certain keywords. All of this seams easy enough using OLE DB to connect to the Windows Search data store on Windows 7.

I have what I hope is a seriously easy question. I have been searching high and low for the field definitions for the SQL Query for Windows Search so I can simply work out what I can search on and what I can get back in my result set. I have not managed to find this anywhere.

Can anyone point me in the right direction?


OK. I have finally found all of the elements I might need. They are located here:

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

Almost too many to mention


This page (http://msdn.microsoft.com/sv-se/library/ff518152(v=VS.85).aspx) is a great starting point, but note that not all of the columns are valid in a Windows Search context (I presume they differ for other apps such as Windows Media Center. Through trial and error I have found that the valid columns on Windows 8.1 Search are:

- 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

Also these Search-specific fields from this page (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


Querying the Index Programmatically is the landing page from where you can find relevant info. Microsoft Windows Search 3.x SDK has sample applications in C#/.NET/Visual Studio

0

精彩评论

暂无评论...
验证码 换一张
取 消