共用方式為


URL 格式設定需求

從 Windows 7 開始,不一致會保留在 URL 的處理和剖析中。 本主題提供有限指南,可巡覽檔案 URL 格式不一致的情況。

本主題的組織方式如下:

使用中的 URL 格式

協力廠商通訊協定負責定義其 URL 格式,並以符合其標準的方式來定義查詢。 例如,Microsoft Outlook 支援具有任一字元的資料夾名稱,包括 URL 中不合法的名稱,例如 "?" 字元。 MAPI 通訊協定處理常式會自行對 URL 進行 URL 編碼。 因此,索引存放區 "%3F" 而不是 "?" ,而且 Outlook 必須在建立查詢時將此納入考慮。

下表列出不同的格式,而且每個格式都會獲指派一個字母識別碼,以供本主題稍後參考。

識別碼 本機檔案 URL 或遠端 範例
A 本機 file:///c:\test\example\
B 本機 file:c:/test/example/
C 本機 c:\test\example\
D 遠端 file:///\\server\share\
E 遠端 file://server/share/
F 遠端 \\server\share\

 

斜線方向、尾端星形和尾端斜線敏感度

在 Windows 搜尋中,斜線方向大致上沒有敏感度。 如果接受格式 c:\test\example ,也會接受 c:/test/example。 不過,雖然 SCOPE 對斜線方向通常不區分,但在遠端 URL 格式 F 的情況下,會區分斜線方向。因此 Scope = '//server/share' 無法運作。

唯一對尾端星號區分並區分 c:\test\ c:\test\* 的 API 是 ISearchCrawlScopeManager。 如果有 的 c:\test\* 排除規則,URL 目錄 c:\test 本身仍會編制索引。 但是,如果排除 URL 是 c:\test\ ,則不會編制 URL 目錄 c:\test 本身的索引。

Windows 搜尋有兩個位置會區分尾端斜線:ItemUrl 和 Path 查詢。 如果有目錄 c:\test ,Windows 搜尋會 c:\test\ 以不同于 c:\test 和 等 path = 'c:\test'System.ItemUrl = 'c:\test' 述詞的處理方式。 例如,述詞 path='file:c:/test' 會比對目錄 c:\test ,但 path='file:c:/test/' 不會因為尾端斜線而符合。

依 API 和查詢的 URL 格式

下表列出所選 API 和查詢所接受的本機檔案 URL 格式。 The formats are associated with a letter (A through F), the meaning of which was denoted in the "URL Formats in Use" section earlier in this topic.

API 或查詢 格式化 A 格式 B C 格式
ISearchCrawlScopeManager Y N Y
IGatherNotifyInline::OnDataChange Y Y Y
ISearchCatalogManager::ReindexMatchingURLs Y Y Y
ISearchCatalogManager::ReindexSearchRoot Y N N
ISearchCatalogManager2::P rioritizeMatchingURLs Y Y Y
Scope= N Y Y
Directory= N Y Y
ItemUrl= N Y Y
Path= N Y Y

 

下表列出所選查詢所接受的遠端檔案 URL 格式。

查詢 格式 D E 格式 F 格式
ISearchCrawlScopeManager N/A N/A N/A
IGatherNotifyInline::OnDataChange N/A N/A N/A
ISearchCatalogManager::ReindexMatchingURLs N/A N/A N/A
ISearchCatalogManager::ReindexSearchRoot N/A N/A N/A
ISearchCatalogManager2::P rioritizeMatchingURLs N/A N/A N/A
Scope= Y Y Y
Directory= Y Y Y
ItemUrl= Y Y Y
Path= Y Y Y

 

索引中包含的內容

Windows 搜尋中的索引編制程式

Windows 搜尋中的查詢程式

Windows 搜尋中的通知程式