Query Language

Boolean and Proximity Operators
Wildcards
Free-Text Queries
Vector Space Queries
Property Value Queries
Query Examples
List of Property Names


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.

This list gives the rules for formulating queries:


To TopBoolean and Proximity Operators

Boolean and proximity operators can create a more precise query.

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

Hints:

Note   The symbols (&, |, !, ~) and the English keywords AND, OR, NOT, and NEAR 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:

LanguageKeywords
GermanUND, ODER, NICHT, NAH
FrenchET, OU, SANS, PRES
SpanishY, O, NO, CERCA
DutchEN, OF, NIET, NABIJ
SwedishOCH, ELLER, INTE, NÄRA
ItalianE, O, NO, VICINO

To TopWildcards

Wildcard operators help you find pages containing 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

To TopFree-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.

To TopVector 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 with words that best match the words being searched for
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)

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

There are two types of property 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 and textual properties
FilenameName of the file
SizeFile size
WriteLast time the file was modified

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:

Property Name Description
DocTitleTitle of the document
DocSubjectSubject of the document
DocAuthorThe document’s author
DocKeywordsKeywords for the document
DocCommentsComments about the document

For a complete list of property names, see the List of Property Names later on this page.

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 Barnes Files authored by “Bill Barnes”
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 certain 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:


To TopQuery Examples

ExampleResults
@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 = John SmithPages 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

To TopList of Property Names

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

Friendly NameDatatypeProperty
AccessDBTYPE_DATELast time file was accessed.
All(not applicable)Searches every property for a string. Can be queried but not retrieved.
AllocSizeDBTYPE_I8Size of disk allocation for file.
AttribDBTYPE_UI4File attributes. Documented in Win32 SDK.
ClassIdDBTYPE_GUIDClass ID of object, for example, WordPerfect, Word, and so on.
ChangeDBTYPE_DATELast time file was changed (includes changes to attributes).
CharacterizationDBTYPE_WSTR | DBTYPE_BYREFCharacterization, or abstract, of document. Computed by Index Server.
Contents(not applicable)Main contents of file. Can be queried but not retrieved.
CreateDBTYPE_DATETime file was created.
DocAppNameDBTYPE_STR | DBTYPE_BYREFName of application that created the file.
DocAuthorDBTYPE_STR | DBTYPE_BYREFAuthor of document.
DocCategoryDBTYPE_STRType of document such as a memo, schedule, or whitepaper.
DocCharCountDBTYPE_I4Number of characters in document.
DocCommentsDBTYPE_STR | DBTYPE_BYREFComments about document.
DocCompanyDBTYPE_STRName of the company for which the document was written.
DocCreatedTmDBTYPE_DATETime document was created.
DocEditTimeDBTYPE_DATETotal time spent editing document.
DocKeywordsDBTYPE_STR | DBTYPE_BYREFDocument keywords.
DocLastAuthorDBTYPE_STR | DBTYPE_BYREFMost recent user who edited document.
DocLastPrintedDBTYPE_DATETime document was last printed.
DocLastSavedTmDBTYPE_DATETime document was last saved.
DocManagerDBTYPE_STRName of the manager of the document’s author.
DocPageCountDBTYPE_I4Number of pages in document.
DocRevNumberDBTYPE_STR | DBTYPE_BYREFCurrent version number of document.
DocSubjectDBTYPE_STR | DBTYPE_BYREFSubject of document.
DocTemplateDBTYPE_STR | DBTYPE_BYREFName of template for document.
DocTitleDBTYPE_STR | DBTYPE_BYREFTitle of document.
DocWordCountDBTYPE_I4Number of words in document.
FileIndexDBTYPE_I8Unique ID of file.
FileNameDBTYPE_WSTR | DBTYPE_BYREFName of file.
HitCountDBTYPE_I4Number of hits (words matching query) in file.
HtmlHRefDBTYPE_WSTR | DBTYPE_BYREFText of HTML HREF. Can be queried but not retrieved.
HtmlHeading1DBTYPE_WSTR | DBTYPE_BYREFText of HTML document in style H1. Can be queried but not retrieved.
HtmlHeading2DBTYPE_WSTR | DBTYPE_BYREFText of HTML document in style H2. Can be queried but not retrieved.
HtmlHeading3DBTYPE_WSTR | DBTYPE_BYREFText of HTML document in style H3. Can be queried but not retrieved.
HtmlHeading4DBTYPE_WSTR | DBTYPE_BYREFText of HTML document in style H4. Can be queried but not retrieved.
HtmlHeading5DBTYPE_WSTR | DBTYPE_BYREFText of HTML document in style H5. Can be queried but not retrieved.
HtmlHeading6DBTYPE_WSTR | DBTYPE_BYREFText of HTML document in style H6. Can be queried but not retrieved.
PathDBTYPE_WSTR | DBTYPE_BYREFFull physical path to file, including file name.
RankDBTYPE_I4Rank of row. Ranges from 0 to 1000. Larger numbers indicate better matches.
RankVectorDBTYPE_I4 | DBTYPE_VECTORRanks of individual components of a vector query.
SecurityChangeDBTYPE_DATELast time security was changed on file.
ShortFileNameDBTYPE_WSTR | DBTYPE_BYREFShort (8.3) file name.
SizeDBTYPE_I8Size of file, in bytes.
USNDBTYPE_I8Update Sequence Number. NTFS drives only.
VPathDBTYPE_WSTR | DBTYPE_BYREFFull virtual path to file, including file name. If more than one possible path, then the best match for the specific query is chosen.
WorkIdDBTYPE_I4Internal ID for file. Used within Index Server.
WriteDBTYPE_DATELast time file was written.