Tripoli Query Language

Using the query page, you can do a full-text search for a word or phrase on a Web site. Searches produce a list of files that contain the word or phrase anywhere in their text.

The rules for formulating queries are as follows:

Boolean and Proximity Operators

Boolean and proximity operators can be used to create a more precise query.

To search forExampleResults
Both terms in the same page access and basic
access & basic
Pages with both the words "access" and "basic"
Either term in a page cgi or isapi
cgi | isapi
Pages with the words "cgi" or "isapi"
The first term without the second term access and not basic
access & ! basic
Pages with the word "access" but not "basic"
Pages not matching a property value not @size = 100
! @size = 100
Pages that are not 100 bytes
Both terms in the same page, close together excel near project
excel ~ project
Pages with the word "excel" near the word "project"



Wildcard operators are useful for finding pages with words similar to a given word.

To search forExample Results
Words with the same prefixcomput* Pages with words that have the prefix "comput," such as "computer," "computing," and so on
Words based on the same stem wordfly** Pages with words based on the same stem as "fly," such as "flying," "flown," "flew," and so on

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 forExample Results
Files that match free-text$contents how do I print in Microsoft Excel? Pages that mention printing and Microsoft Excel.

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 forExampleResults
Pages that contain specific wordslight, bulbFiles that best match the words
Pages that contain weighted prefixes, words, and phrasesinvent*, 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)

Property Value Queries

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 (OLE) properties including the document summary that is stored in files created by ActiveX-aware applications.

There are two types of property queries, relational queries and regular expression queries.

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 nameDescription
AllMatches any property
ContentsWords and phrases in the file
FilenameName of the file
SizeFile size
WriteFile last modification time

ActiveX (OLE) property values can also be used in queries. Web sites with files created by most ActiveX-aware applications can be queried for these properties:

Property name Description
DocTitleTitle of the document
DocSubjectSubject of the document
DocAuthorThe document's author
DocKeywordsKeywords for the document
DocCommentsComments about the document

A more complete list of properties can be found here.

Relational operators

Relational operators are used in relational property queries.

To search forExampleResults
Property values in relation to a fixed value @size < 100
@size <= 100
@size = 100
@size != 100
@size >= 100
@size > 100
Files whose size matches the query
Property values with all of a set of bits on @attrib ^a 0x820Compressed files with the archive bit on
Property values with some of a set of bits on @attrib ^s 0x20Files with the archive bit on

Property values

To search forExampleResults
A specific value@DocAuthor = Bill Gates Files authored by "Bill Gates"
Values beginning with a prefix#DocAuthor George* Files whose author property begins with "George"
Files with any of a set of extensions#filename *.|(exe|,dll|,sys|) Files with .exe, .dll, or .sys extensions
Files modified after a date@write > 96/2/14 10:00:00Files modified after February 14, 1996 at 10:00 GMT
Files modified after a relative date@write > -1d2hFiles modified in the last 26 hours
Vectors matching a vector@vectorprop = { 10, 15, 20 }ActiveX documents with a vectorprop value of { 10, 15, 20 }
Vectors where each value matches a criteria@vectorprop >^a 15ActiveX documents with a vectorprop value in which all values in the vector are greater than 15
Vectors where at least one value matches a criteria@vectorprop =^s 15ActiveX documents with a vectorprop value in which at least one value is 15

Regular expressions

Regular expressions in property queries are defined as follows:

Query Examples

@size > 1000000Pages larger than one million bytes
@write > 95/12/23Pages modified after the date
Apple treePages with the phrase “apple tree”
"apple tree"Same as above
@contents apple treeSame as above
Microsoft and @size > 1000000Pages 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 *.aviVideo files (the # prefix is used because the query contains a regular expression)
@attrib ^s 32Pages with the archive attribute bit on
@docauthor = William GatesPages with the given author
$contents why is the sky blue?Pages that match the query
@size < 100 & #filename *.gifGraphics Interchange Format (GIF) files less than 100 bytes in size

List of Property Names

These properties are always available for queries. Additional properties may also be available depending on the configuration of the Web server.

Property NameDescription
AccessLast time file was accessed
AllocSizeSize of disk allocation for file
AttribFile attributes
ClassIdClass ID of object
ChangeLast time file was changed (includes changes to attributes)
CharacterizationCharacterization / abstract of document. Computed by Tripoli
ContentsMain contents of file
CreateTime file was created
DocAppNameName of application owning file
DocAuthorAuthor of document
DocCharCountNumber of characters in document
DocCommentsComments about document
DocCreatedTmTime document was created
DocEditTimeTotal time spent editing document
DocKeywordsDocument keywords
DocLastAuthorMost recent user who edited document
DocLastPrintedTime document was last printed
DocLastSavedTmTime document was last saved
DocPageCountNumber of pages in document
DocRevNumberCurrent version number of document
DocSubjectSubject of document
DocTemplateName of template for document
DocTitleTitle of document
DocWordCountNumber of words in document
FileIndexUnique ID of file
FileNameName of file
HitCountNumber of hits (words matching query) in file
HtmlHRefText of HTML HREF
PathFull physical path to file, including file name
RankRank of row (ranges from 0 to 1000); larger numbers indicate better matches
SecurityChangeLast time security was changed on file
ShortFileNameShort (8.3) file name
SizeSize of file, in bytes
USNUpdate Sequence Number (NTFS drives only)
VPathFull virtual path to file, including file name (if more than one possible path, then the best match for the specific query is chosen)
WriteLast time file was written

1996 by Microsoft Corporation. All rights reserved.