As you can see from the last entry in the previous table, we can also search by any other of the attributes or properties of the documents that Index Server stores in its catalog, for example:
Attribute or Property | Meaning |
Contents | Words or phrases in the document. This is the default if no other attribute or property is specified. |
Filename | The name of the file. |
Size | The size of the file in bytes. |
Path | The actual path and file name of the document. |
Vpath | The server's virtual path and file name for the document. |
HitCount | The number of hits for the content search in the document. |
Rank | The relative matching score for the query, from 0 to 1000. |
Create | The date and time that the file was originally created. |
Write | The date and time that the file was last updated. |
DocTitle | The Title property for the document. |
DocSubject | The Subject property for that document. |
DocPageCount | The number of pages in the document. |
DocAuthor | The Author property for the document. |
DocKeywords | The keywords specified for that document. |
DocComments | The value of the Comments property for that document. |
The properties starting with DOC are only available for documents created by applications which can store these document properties in their files. In the case of an executable file, for example, there will be no
or DocPageCount
properties available.DocKeywords
We can search for the value of a property, or the attributes of a file, using the
or @
prefixes. In a relational expression, like the expression #
!
@size
<
that we used in the table above, the prefix is 2049
. For a normal expression-based search, we use @
. For example #
#filename
will only match Microsoft Excel workbook files.*.xlw
There's one other prefix that you'll find useful:
. The use of this keyword takes advantages of the Index Server's capabilities as a natural language processor. By pre-pending the $contents
to $
, you tell the Index Server to treat what follows contents
as 'free text'. When you execute a free text query, the Index Server extracts nouns and phrases from the text you supply to construct a query for you. For example, if you specify $contents
$contents
tell
me
how
to
create
a
, the Index Server returns any document that covers creating queries even though the precise text 'tell me how to create a query' appears in none of those documents.query
One final note: The information presented in this section is included for you, the search developer. As we'll see in the samples presented in this chapter, the trick of designing effective searches is to design intuitive search forms that do not require the end user to know anything about the Index Server query language.