Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

438 lines
42 KiB

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Microsoft Index Server Guide: Query Language</title>
<meta name="FORMATTER" content="Microsoft FrontPage 1.1">
<meta name="GENERATOR" content="Microsoft FrontPage 1.1">
</head>
<body bgcolor="#FFFFFF">
<!--Headerbegin-->
<p align=center><a name="TOP"><img src="onepix.gif" alt="Space" align=middle width=1 height=1></a> <a href="default.htm#Top"><img src="toc.gif" alt=" Contents" align=middle border=0 width=89 height=31></a> <a href="queryhlp.htm"><img src="previous.gif" alt="Previous" align=middle border=0 width=32 height=31></a> <a href="indexhlp.htm"><img src="next.gif" alt="Next" align=middle border=0 width=32 height=31></a> </p>
<hr>
<!--Headerend-->
<p><a name="QueryLanguage"><font size=6><strong>Query Language</strong></font></a></p>
<p align=left><!--Chaptoc--></p>
<blockquote>
<p><a href="qrylang.htm#Operators">Boolean and Proximity Operators</a> <br>
<a href="qrylang.htm#Wildcards">Wildcards</a> <br>
<a href="qrylang.htm#FreeTextQueries">Free-Text Queries</a> <br>
<a href="qrylang.htm#VectorQueries">Vector Space Queries</a> <br>
<a href="qrylang.htm#PropertyValueQueries">Property Value Queries</a> <br>
<a href="qrylang.htm#Examples">Query Examples</a> <br>
<a href="#PropertyNamesList">List of Property Names</a> <br>
</p>
</blockquote>
<hr>
<!--ChaptocEnd--><p>You can search for any word or phrase on a Web site by just ust typing the word or phrase into a query form and clicking the
button to execute the query (for example, the Execute Query button on the sample query form). Searches produce a list of files
that contain the word or phrase no matter where they appear in the text. </p>
<p>This list gives the rules for formulating queries: </p>
<ul>
<li><p align=left>Multiple consecutive words are treated as a phrase; they must appear in the same order within a matching document.</p>
</li>
<li><p align=left>Queries are case-insensitive, so you can type your query in uppercase or lowercase. </p>
</li>
<li><p align=left>You can search for any word except for those in the exception list (for English, this includes <em>a</em>, <em>an</em>, <em>and</em>, <em>as</em>, and other
common words), which are ignored during a search.</p>
</li>
<li><p align=left>Words in the exception list are treated as placeholders in phrase and proximity queries. For example, if you searched
for &#147;Word for Windows&#148;, the results could give you &#147;Word for Windows&#148; and &#147;Word and Windows&#148;, because <em>for </em>is a
noise word and appears in the exception list.</p>
</li>
<li><p align=left>Punctuation marks such as the period (.), colon (:), semicolon (;), and comma (,) are ignored during a search.</p>
</li>
<li><p align=left>To use specially treated characters such as &amp;, |, ^, #, @, $, (, ), in a query, enclose your query in quotation marks (&#147;).</p>
</li>
<li><p align=left>To search for a word or phrase containing quotation marks, enclose the entire phrase in quotation marks and then
double the quotation marks around the word or words you want to surround with quotes. For example, &#147;World-Wide
Web or &#147;&#147;Web&#148;&#148;&#148; searches for <em>World-Wide Web or &#147;Web&#148;.</em></p>
</li>
<li><p align=left>You can use <a href="#Operators">Boolean operators</a> (<strong>AND</strong>, <strong>OR</strong>, and <strong>NOT</strong>) and the <a href="#Operators">proximity operator</a> (<strong>NEAR</strong>) to specify additional
search information.</p>
</li>
<li><p align=left>The <a href="#Wildcards">wildcard character</a> (*) can match words with a given prefix. The query <tt>esc*</tt> matches the terms &#147;ESC,&#148; &#147;escape,&#148;
and so on.</p>
</li>
<li><p align=left><a href="#FreeTextQueries">Free-text queries</a> can be specified without regard to query syntax.</p>
</li>
<li><p align=left><a href="#VectorQueries">Vector space queries</a> can be specified.</p>
</li>
<li><p align=left>Activex&#153; (OLE) and file attribute <a href="#PropertyValueQueries">property value queries</a> can be issued.</p>
</li>
</ul>
<hr>
<h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="Operators">Boolean and Proximity Operators</a></h1>
<p>Boolean and proximity operators can create a more precise query.</p>
<div align=left>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=33%><font size=2>To Search For</font></th><th align=left valign=bottom width=33%><font size=2>Example</font></th><th align=left valign=bottom width=33%><font size=2>Results</font></th></tr>
<tr><td valign=top width=33%><font size=2>Both terms in the same page </font></td><td valign=top width=33%><font size=3><code>access and basic</code></font><font size=2> <br>
<b>&#151;</b>Or<b>&#151;</b><br>
</font><font size=3><code>access &amp; basic</code></font></td><td valign=top width=33%><font size=2>Pages with both the words &#147;access&#148; and
&#147;basic&#148; </font></td></tr>
<tr><td valign=top width=33%><font size=2>Either term in a page </font></td><td valign=top width=33%><font size=3><code>cgi or isapi</code></font><font size=2><tt><br>
</tt><b>&#151;</b>Or<b>&#151;</b><br>
</font><font size=3><code>cgi | isapi</code></font></td><td valign=top width=33%><font size=2>Pages with the words &#147;cgi&#148; or &#147;isapi&#148; </font></td></tr>
<tr><td valign=top width=33%><font size=2>The first term without the second term </font></td><td valign=top width=33%><font size=3><code>access and not basic</code></font><font size=2><tt><br>
</tt><b>&#151;</b>Or<b>&#151;</b><br>
</font><font size=3><code>access &amp; ! basic</code></font></td><td valign=top width=33%><font size=2>Pages with the word &#147;access&#148; but not &#147;basic&#148; </font></td></tr>
<tr><td valign=top width=33%><font size=2>Pages not matching a property value </font></td><td valign=top width=33%><font size=3><code>not @size = 100</code></font><font size=2><tt><br>
</tt><b>&#151;</b>Or<b>&#151;</b><br>
</font><font size=3><code>! @size = 100</code></font></td><td valign=top width=33%><font size=2>Pages that are not 100 bytes </font></td></tr>
<tr><td valign=top width=33%><font size=2>Both terms in the same page, close together </font></td><td valign=top width=33%><font size=3><code>excel near project</code></font><font size=2><tt><br>
</tt><b>&#151;</b>Or<b>&#151;</b><br>
</font><font size=3><code>excel ~ project</code></font></td><td valign=top width=33%><font size=2>Pages with the word &#147;excel&#148; near the word
&#147;project&#148; </font></td></tr>
</table>
</div>
<p>Hints: </p>
<ul>
<li><p align=left>You can add parentheses to nest expressions within a query. The expressions in parentheses are evaluated before the
rest of the query.</p>
</li>
<li><p align=left>Use double quotes (&#147;) to indicate that a Boolean or <strong>NEAR</strong> operator keyword should be ignored in your query. For
example, &#147;Abbott and Costello&#148; will match pages with the phrase, not pages that match the Boolean expression. In
addition to being an operator, the word <em>and</em> is a noise word in English.</p>
</li>
<li><p align=left>The<strong> NEAR</strong> operator is similar to the <strong>AND</strong> operator in that <strong>NEAR</strong> returns a match if both words being searched for
are in the same page. However, the <strong>NEAR</strong> operator differs from <strong>AND</strong> because the rank assigned by <strong>NEAR</strong> depends
on the proximity of words. That is, the rank of a page with the searched-for words closer together is greater than or
equal to the rank of a page where the words are farther apart. If the searched-for words are more than 50 words apart,
they are not considered near enough, and the page is assigned a rank of zero.</p>
</li>
<li><p align=left>The <strong>NOT</strong> operator can be used only after an <strong>AND</strong> operator in content queries; it can be used only to exclude pages
that match a previous content restriction. For property value queries, the <strong>NOT</strong> operator can be used apart from the
<strong>AND</strong> operator. </p>
</li>
<li>The <strong>AND</strong> operator has a higher precedence than <strong>OR</strong>. For example, the first three queries are equal, but the fourth is
not:<p align=left>a AND b OR c<br>
c OR a AND b<br>
c OR (a AND b)<br>
(c OR a) AND b</p>
</li>
</ul>
<p><strong>Note&#160;&#160;&#160;</strong>The symbols (&amp;, |, !, ~) and the English keywords <strong>AND</strong>, <strong>OR</strong>, <strong>NOT</strong>, and <strong>NEAR</strong> work the same way in all languages
supported by Index Server. Localized keywords are also available when the browser locale is set to one of the following six
languages:</p>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=40%><font size=2>Language</font></th><th align=left valign=bottom width=60%><font size=2>Keywords</font></th></tr>
<tr><td valign=top width=40%><font size=2>German</font></td><td valign=top width=60%><font size=2><strong>UND</strong>, <strong>ODER</strong>, <strong>NICHT</strong>, <strong>NAH</strong></font></td></tr>
<tr><td valign=top width=40%><font size=2>French</font></td><td valign=top width=60%><font size=2><strong>ET</strong>, <strong>OU</strong>, <strong>SANS</strong>, <strong>PRES</strong></font></td></tr>
<tr><td valign=top width=40%><font size=2>Spanish</font></td><td valign=top width=60%><font size=2><strong>Y</strong>, <strong>O</strong>, <strong>NO</strong>, <strong>CERCA</strong></font></td></tr>
<tr><td valign=top width=40%><font size=2>Dutch</font></td><td valign=top width=60%><font size=2><strong>EN</strong>, <strong>OF</strong>, <strong>NIET</strong>, <strong>NABIJ</strong></font></td></tr>
<tr><td valign=top width=40%><font size=2>Swedish</font></td><td valign=top width=60%><font size=2><strong>OCH</strong>, <strong>ELLER</strong>, <strong>INTE</strong>, <strong>N&Auml;RA</strong></font></td></tr>
<tr><td><font size=2>Italian</font></td><td><font size=2><strong>E</strong>, <strong>O</strong>, <strong>NO</strong>, <strong>VICINO</strong></font></td></tr>
</table>
<hr>
<h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="Wildcards">Wildcards</a></h1>
<p><a name="Wildcards">Wildcard operators help you find pages containing words similar to a given word. </a></p>
<div align=left>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=33%><a name="Wildcards"><font size=2>To Search For</font></a></th><th align=left valign=bottom width=33%><a name="Wildcards"><font size=2>Example </font></a></th><th align=left valign=bottom width=33%><a name="Wildcards"><font size=2>Results</font></a></th></tr>
<tr><td valign=top width=33%><a name="Wildcards"><font size=2>Words with the same prefix</font></a></td><td valign=top width=33%><a name="Wildcards"><font size=3><code>comput*</code></font><font size=2><tt> </tt></font></a></td><td valign=top width=33%><a name="Wildcards"><font size=2>Pages with words that have the prefix
&#147;comput,&#148; such as &#147;computer,&#148; &#147;computing,&#148;
and so on</font></a></td></tr>
<tr><td valign=top width=33%><a name="Wildcards"><font size=2>Words based on the same stem word</font></a></td><td valign=top width=33%><a name="Wildcards"><font size=3><code>fly**</code></font><font size=2><tt> </tt></font></a></td><td valign=top width=33%><a name="Wildcards"><font size=2>Pages with words based on the same stem as
&#147;fly,&#148; such as &#147;flying,&#148; &#147;flown,&#148; &#147;flew,&#148; and
so on </font></a></td></tr>
</table>
</div>
<hr>
<h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="FreeTextQueries">Free-Text Queries</a></h1>
<p><a name="FreeTextQueries">The query engine finds pages that best match the words and phrases in a free-text query. This is done by automatically finding
pages that match the meaning, not the exact wording, of the query. Boolean, proximity, and wildcard operators are ignored
within a free-text query. Free-text queries are prefixed with <tt>$contents</tt>.</a></p>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=33%><a name="FreeTextQueries"><font size=2>To Search For</font></a></th><th align=left valign=bottom width=33%><a name="FreeTextQueries"><font size=2>Example </font></a></th><th align=left valign=bottom width=33%><a name="FreeTextQueries"><font size=2>Results</font></a></th></tr>
<tr><td valign=top width=33%><a name="FreeTextQueries"><font size=2>Files that match free-text</font></a></td><td valign=top width=33%><a name="FreeTextQueries"><font size=3><code>$contents how do I print in
Microsoft Excel? </code></font></a></td><td valign=top width=33%><a name="FreeTextQueries"><font size=2>Pages that mention printing and Microsoft
Excel.</font></a></td></tr>
</table>
<hr>
<h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="VectorQueries">Vector Space Queries</a></h1>
<p>The query engine supports vector space queries. Vector queries return pages that match a list of words and phrases. The rank
of each page indicates how well the page matched the query. </p>
<div align=left>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=33%><font size=2>To Search For</font></th><th align=left valign=bottom width=33%><font size=2>Example</font></th><th align=left valign=bottom width=33%><font size=2>Results</font></th></tr>
<tr><td valign=top width=33%><font size=2>Pages that contain specific words</font></td><td valign=top width=33%><font size=3><code>light, bulb</code></font></td><td valign=top width=33%><font size=2>Files with words that best match the words
being searched for</font></td></tr>
<tr><td valign=top width=33%><font size=2>Pages that contain weighted prefixes, words,
and phrases</font></td><td valign=top width=33%><font size=3><code>invent*, light[50], bulb[10],
&quot;light bulb&quot;[400]</code></font></td><td valign=top width=33%><font size=2>Files that contain words prefixed by &#147;invent,&#148;
the words &#147;light,&#148; &#147;bulb,&#148; and the phrase
&#147;light bulb&#148; (the terms are weighted)</font></td></tr>
</table>
</div>
<ul>
<li>Components in vector queries are separated by commas. </li>
<li>Components in vector queries can be weighted by using the [weight] syntax. </li>
<li>Pages returned by vector queries do not necessarily match every term in the query. </li>
<li>Vector queries work best when the results are sorted by rank. </li>
</ul>
<hr>
<h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="PropertyValueQueries">Property Value Queries</a></h1>
<p>Property value queries can be used to find files that have property values that match a given criteria. The properties over which
you can query include basic file information like file name and file size, and ActiveX properties including the document
summary (abstract) that is stored in files created by ActiveX-aware applications. </p>
<p>There are two types of property queries:</p>
<ul>
<li><p align=left><a name="PropertyValueQueries"><em>Relational property queries</em> consist of an &#147;at&#148; character (@), a </a><a href="#PropertyNames">property name</a>, a <a href="#RelationalOperators">relational operator</a>, and a <a href="#PropertyValues">property
value</a>. For example, to find all of the files larger than one million bytes, issue the query <tt>@size &gt; 1000000</tt>.</p>
</li>
<li><p align=left><em>Regular expression property queries</em> consist of a number sign (#), a <a href="#PropertyNames">property name</a>, and a <a href="#RegularExpressions">regular expression</a> for the
<a href="#PropertyValues">property value</a>. For example, to find to find all of the video (.avi) files, issue the query<tt> #filename *.avi</tt>. Regular
expressions will never match the special properties contents (<tt>#contents</tt>) and all (<tt>#all</tt>). There may also be additional
format-specific properties that cannot be matched (for example, <tt>#HtmlHRef</tt> for HTML pages).</p>
</li>
</ul>
<h2><a name="PropertyNames">Property Names </a></h2>
<p><a name="PropertyNames">Property names are preceded by either the &#147;at&#148; (@) or number sign (#) character. Use @ for relational queries, and # for
regular expression queries. </a></p>
<p><a name="PropertyNames">If no property name is specified, <i>@contents</i> is assumed. </a></p>
<p><a name="PropertyNames">Properties available for all files include: </a></p>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=40%><a name="PropertyNames"><font size=2>Property Name</font></a></th><th align=left valign=bottom width=60%><a name="PropertyNames"><font size=2>Description</font></a></th></tr>
<tr><td valign=top width=40%><font size=2>All</font></td><td valign=top width=60%><font size=2>Matches any property</font></td></tr>
<tr><td valign=top width=40%><a name="PropertyNames"><font size=2>Contents</font></a></td><td valign=top width=60%><a name="PropertyNames"><font size=2>Words and phrases in the file</font></a><font size=2> and textual properties</font></td></tr>
<tr><td valign=top width=40%><a name="PropertyNames"><font size=2>Filename</font></a></td><td valign=top width=60%><a name="PropertyNames"><font size=2>Name of the file</font></a></td></tr>
<tr><td valign=top width=40%><a name="PropertyNames"><font size=2>Size</font></a></td><td valign=top width=60%><a name="PropertyNames"><font size=2>File size</font></a></td></tr>
<tr><td valign=top width=40%><a name="PropertyNames"><font size=2>Write</font></a></td><td valign=top width=60%><font size=2>L</font><a name="PropertyNames"><font size=2>ast time</font></a><font size=2> the file was modified</font></td></tr>
</table>
<p><a name="PropertyNames">ActiveX property values can also be used in queries. Web sites with files created by most ActiveX-aware applications can be
queried for these properties:</a></p>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=40%><a name="PropertyNames"><font size=2>Property Name </font></a></th><th align=left valign=bottom width=60%><a name="PropertyNames"><font size=2>Description </font></a></th></tr>
<tr><td valign=top width=40%><a name="PropertyNames"><font size=2>DocTitle</font></a></td><td valign=top width=60%><a name="PropertyNames"><font size=2>Title of the document</font></a></td></tr>
<tr><td valign=top width=40%><a name="PropertyNames"><font size=2>DocSubject</font></a></td><td valign=top width=60%><a name="PropertyNames"><font size=2>Subject of the document </font></a></td></tr>
<tr><td valign=top width=40%><a name="PropertyNames"><font size=2>DocAuthor</font></a></td><td valign=top width=60%><a name="PropertyNames"><font size=2>The document&#146;s author </font></a></td></tr>
<tr><td valign=top width=40%><a name="PropertyNames"><font size=2>DocKeywords</font></a></td><td valign=top width=60%><a name="PropertyNames"><font size=2>Keywords for the document </font></a></td></tr>
<tr><td valign=top width=40%><a name="PropertyNames"><font size=2>DocComments</font></a></td><td valign=top width=60%><a name="PropertyNames"><font size=2>Comments about the document </font></a></td></tr>
</table>
<p>For a complete list of property names, see the <a href="#PropertyNamesList">List of Property Names</a> later on this page.</p>
<h2><a name="RelationalOperators">Relational Operators</a></h2>
<p>Relational operators are used in relational property queries. </p>
<div align=left>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=33%><font size=2>To Search For</font></th><th align=left valign=bottom width=33%><font size=2>Example</font></th><th align=left valign=bottom width=33%><font size=2>Results</font></th></tr>
<tr><td valign=top width=33%><font size=2>Property values in relation to a fixed value </font></td><td valign=top width=33%><font size=3><code>@size &lt; 100 <br>
@size &lt;= 100 <br>
@size = 100 <br>
@size != 100 <br>
@size &gt;= 100 <br>
@size &gt; 100 </code></font></td><td valign=top width=33%><font size=2>Files whose size matches the query</font></td></tr>
<tr><td valign=top width=33%><font size=2>Property values with all of a set of bits on </font></td><td valign=top width=33%><font size=3><code>@attrib ^a 0x820</code></font></td><td valign=top width=33%><font size=2>Compressed files with the archive bit on </font></td></tr>
<tr><td valign=top width=33%><font size=2>Property values with some of a set of bits on </font></td><td valign=top width=33%><font size=3><code>@attrib ^s 0x20</code></font></td><td valign=top width=33%><font size=2>Files with the archive bit on </font></td></tr>
</table>
</div>
<h2><a name="PropertyValues">Property Values</a></h2>
<div align=left>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=130><font size=2>To Search For</font></th><th align=left valign=bottom width=200><font size=2>Example</font></th><th align=left valign=bottom width=170><font size=2>Results</font></th></tr>
<tr><td valign=top width=33%><font size=2>A specific value</font></td><td valign=top width=33%><font size=3><code>@DocAuthor = Bill Barnes </code></font></td><td valign=top width=33%><font size=2>Files authored by &#147;Bill Barnes&#148;</font></td></tr>
<tr><td valign=top width=33%><font size=2>Values beginning with a prefix</font></td><td valign=top width=33%><font size=3><code>#DocAuthor George* </code></font></td><td valign=top width=33%><font size=2>Files whose author property begins with
&#147;George&#148; </font></td></tr>
<tr><td valign=top width=33%><font size=2>Files with any of a set of extensions</font></td><td valign=top width=33%><font size=3><code>#filename *.|(exe|,dll|,sys|) </code></font></td><td valign=top width=33%><font size=2>Files with .exe, .dll, or .sys extensions </font></td></tr>
<tr><td valign=top width=33%><font size=2>Files modified after a certain date</font></td><td valign=top width=33%><font size=3><code>@write &gt; 96/2/14 10:00:00</code></font></td><td valign=top width=33%><font size=2>Files modified after February 14, 1996 at 10:00
GMT</font></td></tr>
<tr><td valign=top width=33%><font size=2>Files modified after a relative date</font></td><td valign=top width=33%><font size=3><code>@write &gt; -1d2h</code></font></td><td valign=top width=33%><font size=2>Files modified in the last 26 hours</font></td></tr>
<tr><td valign=top width=33%><font size=2>Vectors matching a vector</font></td><td valign=top width=33%><font size=3><code>@vectorprop = { 10, 15, 20 }</code></font></td><td valign=top width=33%><font size=2>ActiveX documents with a vectorprop value
of { 10, 15, 20 }</font></td></tr>
<tr><td valign=top width=33%><font size=2>Vectors where each value matches a criteria</font></td><td valign=top width=33%><font size=3><code>@vectorprop &gt;^a 15</code></font></td><td valign=top width=33%><font size=2>ActiveX documents with a vectorprop value
in which all values in the vector are greater
than 15</font></td></tr>
<tr><td valign=top width=33%><font size=2>Vectors where at least one value matches a
criteria</font></td><td valign=top width=33%><font size=3><code>@vectorprop =^s 15</code></font></td><td valign=top width=33%><font size=2>ActiveX documents with a vectorprop value
in which at least one value is 15</font></td></tr>
</table>
</div>
<ul>
<li><p align=left>Be sure to use the pound (#) character before the property name when using a regular expression in a property value,
and an &#147;at&#148; (@) character otherwise. The equal (=) relational operator is assumed for regular-expression queries.</p>
</li>
<li><p align=left>File name (#filename) is the only property that supports regular expressions with wildcards to the <i>left</i> of text. This is the
only case where wildcards to the left are efficient.</p>
</li>
<li><p align=left>Date and time values are of the form <em>yyyy/mm/dd hh:mm:ss</em>. The first two characters of the year and the entire time
can be omitted. Dates and times are in Greenwich Mean Time (GMT).</p>
</li>
<li><p align=left>Dates and times relative to the current time can be expressed with a minus (-) character followed by zero or by more
integer unit and time unit pairs. Time units are expressed as: (y) for years, (m) for months, (w) for weeks, (d) for days,
(h) for hours, (n) for minutes, and (s) for seconds.</p>
</li>
<li><p align=left>Currency values are of the form <em>x.y</em>, where <em>x</em> is the whole value amount and <em>y</em> is the fractional amount. There is no
assumption about units.</p>
</li>
<li><p align=left>Boolean values are (t) or (true) for <strong>TRUE</strong> and (f) or (false) for <strong>FALSE</strong>.</p>
</li>
<li><p align=left>Vectors (VT_VECTOR) are expressed as an opening brace ({), followed by a comma-separated list of values, then a
closing brace (}).</p>
</li>
<li><p align=left>Single-value expressions that are compared against vectors are expressed as a <a href="#RelationalOperators">relational operator</a>, then a (^a) for <i>all of</i>
or a (^s) for <i>some of</i>.</p>
</li>
<li><p align=left>Numeric values can be in decimal or hexadecimal (preceded by 0x).</p>
</li>
<li><p align=left>The <i>contents</i> property does not support relational operators. If a relational operator is specified, no results will be
found. For example, <tt>@contents Microsoft</tt> will find documents containing Microsoft, but <tt>@contents</tt><b><tt>=</tt></b><tt>Microsoft</tt>
will find none. </p>
</li>
</ul>
<h3><a name="RegularExpressions">Regular Expressions</a></h3>
<p>Regular expressions in property queries are defined as follows: </p>
<ul>
<li><p align=left>Any character except asterisk (*), period (.), question mark (?), and vertical bar (|) defaults to matching just itself.</p>
</li>
<li><p align=left>Regular expressions can be enclosed in matching quotes (&#147;), and must be enclosed in quotes if they contain a space ( )
or closing parenthesis ()).</p>
</li>
<li><p align=left>The characters *, ., and ? behave as they behave in Windows; they match any number of characters, match (.) or end
of string, and match any one character, respectively.</p>
</li>
<li><p align=left>The character | is an escape character. After |, the following characters have special meaning: </p>
<ul>
<li>( opens a group. Must be followed by a matching ).</li>
<li>) closes a group. Must be preceded by a matching (. </li>
<li>[ opens a character class. Must be followed by a matching (un-escaped) ]. </li>
<li>{ opens a counted match. Must be followed by a matching }. </li>
<li>} closes a counted match. Must be preceded by a matching {. </li>
<li>, separates <strong>OR</strong> clauses. </li>
<li>* matches zero or more occurrences of the preceding expression.</li>
<li>? matches zero or one occurrences of the preceding expression.</li>
<li>+ matches one or more occurrences of the preceding expression. </li>
<li><p align=left>Anything else, including |, matches itself.</p>
</li>
</ul>
</li>
<li><p align=left>Between square brackets ([]) the following characters have special meaning:<br>
</p>
<ul>
<li>^ matches everything but following classes. Must be the first character. </li>
<li>] matches ]. May only be preceded by ^, otherwise it closes the class. </li>
<li>- range operator. Preceded and followed by normal characters.</li>
<li><p align=left>Anything else matches itself (or begins or ends a range at itself).</p>
</li>
</ul>
</li>
<li><p align=left>Between curly braces ({}) the following syntax applies:</p>
<ul>
<li>|{m|} matches exactly <em>m</em> occurrences of the preceding expression. (0 &lt; m &lt; 256). </li>
<li>|{m,|} matches at least <em>m</em> occurrences of the preceding expression. (1 &lt; m &lt; 256). </li>
<li><p align=left>|{m,n|} matches between <em>m</em> and <em>n</em> occurrences of the preceding expression, inclusive. (0 &lt; m &lt; 256, 0 &lt; n &lt;
256).</p>
</li>
</ul>
</li>
<li><p align=left>To match *, ., and ?, enclose them in brackets (for example, <tt>|[*]sample</tt> will match &#147;<tt>*sample&#148;</tt>).</p>
</li>
</ul>
<hr>
<h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="Examples">Query Examples</a></h1>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=40%><font size=2>Example</font></th><th align=left valign=bottom width=60%><font size=2>Results</font></th></tr>
<tr><td valign=top width=40%><font size=3><code>@size &gt; 1000000</code></font></td><td valign=top width=60%><font size=2>Pages larger than one million bytes</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>@write &gt; 95/12/23</code></font></td><td valign=top width=60%><font size=2>Pages modified after the date</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>Apple tree</code></font></td><td valign=top width=60%><font size=2>Pages with the phrase &#147;apple tree&#148;</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>&quot;apple tree&quot;</code></font></td><td valign=top width=60%><font size=2>Same as above</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>@contents apple tree</code></font></td><td valign=top width=60%><font size=2>Same as above</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>Microsoft and @size &gt; 1000000</code></font></td><td valign=top width=60%><font size=2>Pages with the word &#147;Microsoft&#148; that are larger than one million bytes</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>&quot;microsoft and @size &gt; 1000000&quot;</code></font></td><td valign=top width=60%><font size=2>Pages with the phrase specified (not the same as above)</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>#filename *.avi</code></font></td><td valign=top width=60%><font size=2>Video files (the # prefix is used because the query contains a regular expression)</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>@attrib ^s 32</code></font></td><td valign=top width=60%><font size=2>Pages with the archive attribute bit on</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>@docauthor = John Smith</code></font></td><td valign=top width=60%><font size=2>Pages with the given author</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>$contents why is the sky blue?</code></font></td><td valign=top width=60%><font size=2>Pages that match the query</font></td></tr>
<tr><td valign=top width=40%><font size=3><code>@size &lt; 100 &amp; #filename *.gif</code></font></td><td valign=top width=60%><font size=2>Graphics Interchange Format (GIF) files less than 100 bytes in size</font></td></tr>
</table>
<hr>
<h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="PropertyNamesList">List of Property Names</a></h1>
<p>These properties are always available for queries. Additional properties may also be available depending on the configuration
of the Web server.</p>
<div align=left>
<table border=1 cellpadding=5 cellspacing=0 width=100%>
<tr><th align=left valign=bottom width=15%><font size=2>Friendly Name</font></th><th align=left valign=bottom width=20%><font size=2>Datatype</font></th><th align=left valign=bottom width=65%><font size=2>Property</font></th></tr>
<tr><td valign=top width=15%><font size=2>Access</font></td><td valign=top width=20%><font size=2>DBTYPE_DATE</font></td><td valign=top width=65%><font size=2>Last time file was accessed.</font></td></tr>
<tr><td valign=top width=15%><font size=2>All</font></td><td valign=top width=20%><font size=2>(not applicable)</font></td><td valign=top width=65%><font size=2>Searches every property for a string. <em>Can be queried but not retrieved.</em></font></td></tr>
<tr><td valign=top width=15%><font size=2>AllocSize</font></td><td valign=top width=20%><font size=2>DBTYPE_I8</font></td><td valign=top width=65%><font size=2>Size of disk allocation for file.</font></td></tr>
<tr><td valign=top width=15%><font size=2>Attrib</font></td><td valign=top width=20%><font size=2>DBTYPE_UI4</font></td><td valign=top width=65%><font size=2>File attributes. Documented in Win32 SDK.</font></td></tr>
<tr><td valign=top width=15%><font size=2>ClassId</font></td><td valign=top width=20%><font size=2>DBTYPE_GUID</font></td><td valign=top width=65%><font size=2>Class ID of object, for example, WordPerfect, Word, and so on.</font></td></tr>
<tr><td valign=top width=15%><font size=2>Change</font></td><td valign=top width=20%><font size=2>DBTYPE_DATE</font></td><td valign=top width=65%><font size=2>Last time file was changed (includes changes to attributes).</font></td></tr>
<tr><td valign=top width=15%><a name="Characterization"><font size=2>Characterization</font></a></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Characterization, or abstract, of document. Computed by Index Server.</font></td></tr>
<tr><td valign=top width=15%><font size=2>Contents</font></td><td valign=top width=20%><font size=2>(not applicable)</font></td><td valign=top width=65%><font size=2>Main contents of file. <em>Can be queried but not retrieved.</em></font></td></tr>
<tr><td valign=top width=15%><font size=2>Create</font></td><td valign=top width=20%><font size=2>DBTYPE_DATE</font></td><td valign=top width=65%><font size=2>Time file was created.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocAppName</font></td><td valign=top width=20%><font size=2>DBTYPE_STR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Name of application that created the file.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocAuthor</font></td><td valign=top width=20%><font size=2>DBTYPE_STR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Author of document.</font></td></tr>
<tr><td><font size=2>DocCategory</font></td><td><font size=2>DBTYPE_STR</font></td><td><font size=2>Type of document such as a memo, schedule, or whitepaper.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocCharCount</font></td><td valign=top width=20%><font size=2>DBTYPE_I4</font></td><td valign=top width=65%><font size=2>Number of characters in document.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocComments</font></td><td valign=top width=20%><font size=2>DBTYPE_STR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Comments about document.</font></td></tr>
<tr><td><font size=2>DocCompany</font></td><td><font size=2>DBTYPE_STR</font></td><td><font size=2>Name of the company for which the document was written.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocCreatedTm</font></td><td valign=top width=20%><font size=2>DBTYPE_DATE</font></td><td valign=top width=65%><font size=2>Time document was created.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocEditTime</font></td><td valign=top width=20%><font size=2>DBTYPE_DATE</font></td><td valign=top width=65%><font size=2>Total time spent editing document.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocKeywords</font></td><td valign=top width=20%><font size=2>DBTYPE_STR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Document keywords.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocLastAuthor</font></td><td valign=top width=20%><font size=2>DBTYPE_STR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Most recent user who edited document.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocLastPrinted</font></td><td valign=top width=20%><font size=2>DBTYPE_DATE</font></td><td valign=top width=65%><font size=2>Time document was last printed.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocLastSavedTm</font></td><td valign=top width=20%><font size=2>DBTYPE_DATE</font></td><td valign=top width=65%><font size=2>Time document was last saved.</font></td></tr>
<tr><td><font size=2>DocManager</font></td><td><font size=2>DBTYPE_STR</font></td><td><font size=2>Name of the manager of the document&#146;s author.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocPageCount</font></td><td valign=top width=20%><font size=2>DBTYPE_I4</font></td><td valign=top width=65%><font size=2>Number of pages in document.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocRevNumber</font></td><td valign=top width=20%><font size=2>DBTYPE_STR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Current version number of document.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocSubject</font></td><td valign=top width=20%><font size=2>DBTYPE_STR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Subject of document.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocTemplate</font></td><td valign=top width=20%><font size=2>DBTYPE_STR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Name of template for document.</font></td></tr>
<tr><td valign=top width=15%><a name="DocTitle"><font size=2>DocTitle</font></a></td><td valign=top width=20%><font size=2>DBTYPE_STR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Title of document.</font></td></tr>
<tr><td valign=top width=15%><font size=2>DocWordCount</font></td><td valign=top width=20%><font size=2>DBTYPE_I4</font></td><td valign=top width=65%><font size=2>Number of words in document.</font></td></tr>
<tr><td valign=top width=15%><font size=2>FileIndex</font></td><td valign=top width=20%><font size=2>DBTYPE_I8</font></td><td valign=top width=65%><font size=2>Unique ID of file.</font></td></tr>
<tr><td valign=top width=15%><a name="FileName"><font size=2>FileName</font></a></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Name of file.</font></td></tr>
<tr><td valign=top width=15%><font size=2>HitCount</font></td><td valign=top width=20%><font size=2>DBTYPE_I4</font></td><td valign=top width=65%><font size=2>Number of hits (words matching query) in file.</font></td></tr>
<tr><td valign=top width=15%><font size=2>HtmlHRef</font></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Text of HTML HREF. <em>Can be queried but not retrieved.</em></font></td></tr>
<tr><td valign=top width=15%><font size=2>HtmlHeading1</font></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Text of HTML document in style H1. <em>Can be queried but not retrieved.</em></font></td></tr>
<tr><td valign=top width=15%><font size=2>HtmlHeading2</font></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Text of HTML document in style H2. <em>Can be queried but not retrieved.</em></font></td></tr>
<tr><td valign=top width=15%><font size=2>HtmlHeading3</font></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Text of HTML document in style H3. <em>Can be queried but not retrieved.</em></font></td></tr>
<tr><td valign=top width=15%><font size=2>HtmlHeading4</font></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Text of HTML document in style H4. <em>Can be queried but not retrieved.</em></font></td></tr>
<tr><td valign=top width=15%><font size=2>HtmlHeading5</font></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Text of HTML document in style H5. <em>Can be queried but not retrieved.</em></font></td></tr>
<tr><td valign=top width=15%><font size=2>HtmlHeading6</font></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Text of HTML document in style H6. <em>Can be queried but not retrieved.</em></font></td></tr>
<tr><td valign=top width=15%><a name="Path"><font size=2>Path</font></a></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Full physical path to file, including file name.</font></td></tr>
<tr><td valign=top width=15%><font size=2>Rank</font></td><td valign=top width=20%><font size=2>DBTYPE_I4</font></td><td valign=top width=65%><font size=2>Rank of row. Ranges from 0 to 1000. Larger numbers indicate better matches.</font></td></tr>
<tr><td valign=top width=15%><font size=2>RankVector</font></td><td valign=top width=20%><font size=2>DBTYPE_I4 |
DBTYPE_VECTOR</font></td><td valign=top width=65%><font size=2>Ranks of individual components of a </font><a href="#VectorQueries"><font size=2>vector query</font></a><font size=2>.</font></td></tr>
<tr><td valign=top width=15%><font size=2>SecurityChange</font></td><td valign=top width=20%><font size=2>DBTYPE_DATE</font></td><td valign=top width=65%><font size=2>Last time security was changed on file.</font></td></tr>
<tr><td valign=top width=15%><font size=2>ShortFileName</font></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Short (8.3) file name.</font></td></tr>
<tr><td valign=top width=15%><font size=2>Size</font></td><td valign=top width=20%><font size=2>DBTYPE_I8</font></td><td valign=top width=65%><font size=2>Size of file, in bytes.</font></td></tr>
<tr><td valign=top width=15%><font size=2>USN</font></td><td valign=top width=20%><font size=2>DBTYPE_I8</font></td><td valign=top width=65%><font size=2>Update Sequence Number. NTFS drives only.</font></td></tr>
<tr><td valign=top width=15%><a name="VPath"><font size=2>VPath</font></a></td><td valign=top width=20%><font size=2>DBTYPE_WSTR |
DBTYPE_BYREF</font></td><td valign=top width=65%><font size=2>Full virtual path to file, including file name. If more than one possible path, then the best
match for the specific query is chosen.</font></td></tr>
<tr><td valign=top width=15%><font size=2>WorkId</font></td><td valign=top width=20%><font size=2>DBTYPE_I4</font></td><td valign=top width=65%><font size=2>Internal ID for file. Used within Index Server.</font></td></tr>
<tr><td valign=top width=15%><font size=2>Write</font></td><td valign=top width=20%><font size=2>DBTYPE_DATE</font></td><td valign=top width=65%><font size=2>Last time file was written.</font></td></tr>
</table>
</div>
<!--Footerbegin-->
<hr>
<p align=center><a href="default.htm#Top"><img src="toc.gif" alt=" Contents" align=middle border=0 width=89 height=31></a> <a href="queryhlp.htm"><img src="previous.gif" alt="Previous" align=middle border=0 width=32 height=31></a> <a href="#TOP"><img src="up_end.gif" alt="To Top" align=middle border=0 width=32 height=31></a> <a href="indexhlp.htm"><img src="next.gif" alt="Next" align=middle border=0 width=32 height=31></a> </p>
<hr>
<p align=center><em>&#169; 1996 by Microsoft Corporation. All rights reserved.
<!--Footerend-->
</em></p>
</body>
</html>