Query Language

You can search for any word or phrase on a Web site by 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). This section covers the following topics:

Boolean and Proximity Operators

Boolean and proximity operators can create a more precise query.

To Search For Example Results
Both terms in the same page delta and dentist

Or

delta & dentist
Pages with both the words “access” and “basic”
Either term in a page delta or pmi
Pages with the words “cgi” or “isapi”
Both terms in the same page, close together eligible near benefits
Pages with the word “excel” near the word “project”

Hints:

Note:   The NEAR operator can be applied only to words or phrases.

Back to top

 

Wildcards

Wildcard operators help you find pages containing words similar to a given word.

To Search For Example Results
Words with the same prefix comput* Pages with words that have the prefix “comput,” such as “computer,” “computing,” and so on
Words based on the same stem word fly** Pages with words based on the same stem as “fly,” such as “flying,” “flown,” “flew,” and so on

Back to top

 

Free-Text Queries

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 $contents.

To Search For Example Results
Files that match free-text $contents how do I print in Microsoft Excel? Pages that mention printing and Microsoft Excel.

Back to top

 

Vector Space Queries

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.

To Search For Example Results
Pages that contain specific words light, bulb Files with words that best match the words being searched for
Pages that contain weighted prefixes, words, and phrases invent*, light[50], bulb[10], "light bulb"[400] Files that contain words prefixed by “invent,” the words “light,” “bulb,” and the phrase “light bulb” (the terms are weighted)

 

Back to top

 

Property Names

Property names are preceded by either the “at” (@) or number sign (#) character. Use @ for relational queries, and # for regular expression queries.

If no property name is specified, @contents is assumed.

Properties available for all files include:

Property Name Description
All Matches words, phrases, and any property
Contents Words and phrases in the file
Filename Name of the file
Size File size
Write Last time the file was modified

Back to top

 

 

Regular Expressions

Regular expressions in property queries are defined as follows:

Back to top

 

Query Examples

Example Results
@write > 95/12/23 Pages modified after the date
Apple tree Pages with the phrase “apple tree”
"apple tree" Same as above
@contents apple tree< Same as above
Microsoft and @size > 1000000 Pages with the word “Microsoft” that are larger than one million bytes
"microsoft and @size > 1000000" Pages with the phrase specified (not the same as above)
#filename *.avi Video files (the # prefix is used because the query contains a regular expression)
@attrib ^s 32 Pages with the archive attribute bit on
@docauthor = John Smith Pages with the given author
$contents why is the sky blue? Pages that match the query
@size < 100 & #filename *.gif Graphics Interchange Format (GIF) files less than 100 bytes in size