Export (0) Print
Expand All

URL Formatting Requirements

As of Windows 7, inconsistencies remain in the handling and parsing of URLs. This topic provides a limited guide to navigating inconsistencies in file URL formats.

This topic is organized as follows:

URL Formats in Use

Third-party protocols are responsible for defining their URL format and defining queries in a manner that conforms to their standard. For example, Microsoft Outlook supports folder names with arbitrary characters, including those that are illegal in URLs such as the "?" character. The MAPI protocol handler does its own URL-encoding of its URLs. Hence, the index stores "%3F" instead of "?" , and Outlook must take this into account when creating queries.

The different formats are listed in the following table and are each assigned a letter identifier for referring to them later in this topic.

IDLocal file URL or remoteExample
ALocalfile:///c:\test\example\
BLocalfile:c:/test/example/
CLocalc:\test\example\
DRemotefile:///\\server\share\
ERemotefile://server/share/
FRemote\\server\share\

 

Slash Direction, Trailing Star, and Trailing Slash Sensitivity

In Windows Search there is largely no sensitivity to slash direction. If the format c:\test\example is accepted, then c:/test/example is accepted as well. However, although SCOPE is generally insensitive to slash direction, it is sensitive to the slash direction in the case of remote URL format F. Hence, Scope = '//server/share' does not work.

The only API that is sensitive to trailing stars and distinguishes between c:\test\ and c:\test\* is ISearchCrawlScopeManager. If there is an exclusion rule for c:\test\*, the URL directory c:\test itself will still be indexed. But if the exclusion URL is c:\test\, the URL directory c:\test itself will not be indexed.

There are two places where Windows Search is sensitive to trailing slashes: ItemUrl and Path queries. If there is a directory c:\test, Windows Search treats c:\test\ differently from c:\test for predicates like path = 'c:\test' and System.ItemUrl = 'c:\test'. For example, the predicate path='file:c:/test' would match the directory c:\test, but path='file:c:/test/' would not, due to the trailing slash.

URL Formats by API and Query

Local file URL formats accepted by selected APIs and queries are listed in the following table. 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 or queryFormat AFormat BFormat C
ISearchCrawlScopeManager YNY
IGatherNotifyInline::OnDataChange YYY
ISearchCatalogManager::ReindexMatchingURLs YYY
ISearchCatalogManager::ReindexSearchRoot YNN
ISearchCatalogManager2::PrioritizeMatchingURLs YYY
Scope=NYY
Directory=NYY
ItemUrl=NYY
Path=NYY

 

Remote file URL formats accepted by selected queries are listed in the following table.

QueryFormat DFormat EFormat F
ISearchCrawlScopeManager N/AN/AN/A
IGatherNotifyInline::OnDataChange N/AN/AN/A
ISearchCatalogManager::ReindexMatchingURLs N/AN/AN/A
ISearchCatalogManager::ReindexSearchRoot N/AN/AN/A
ISearchCatalogManager2::PrioritizeMatchingURLs N/AN/AN/A
Scope=YYY
Directory=YYY
ItemUrl=YYY
Path=YYY

 

Related topics

What Is Included in the Index
Indexing Process in Windows Search
Querying Process in Windows Search
Notifications Process in Windows Search

 

 

Community Additions

ADD
Show:
© 2014 Microsoft