Simple Queries


This section introduces how to write queries for interpretation by the simple query parser.

Words and Phrases Separated by Commas

A simple query is specified as words and phrases, separated by commas. To see documents about using text editors to create Web documents, start with a single-word query, such as:

editor

Your query finds all the documents that include the word "editor." However, this search would include not only documents about text editors, but also documents about people who are editors. (You don't have to specify the plural form, because a simple search includes stemmed variations, such as "editors.") Documents about the Web that did not include the word "editor" would not be retrieved.

For more specific results, enter several words or phrases, separated by commas, that describe the subject more precisely, such as:

text editor, document, web

Case-sensitivity

The search engine attempts to match the case-sensitivity provided in the query expression, when mixed case is used. For search terms entered completely in lowercase or uppercase, the search engine looks for all mixed-case variations.

Search terms with mixed case automatically become case-sensitive. For example, the query of Apple behaves as if you had specified <case>Apple (which would find only the precise string Apple), while the query of apple finds all of the following: APPLE, Apple, apple.

The CASE modifier preserves case-sensitivity of the query. For example, if you want to search for the term "OCX" and want to find instances of "OCX" in uppercase only, you could enter this query:

<CASE> <WORD> OCX

The search engine would interpret the above query expression to mean: find all documents containing one or more instances of the word "OCX" spelled in uppercase, not mixed case.

How to Search Hyperlink Contents

Using the Verity operators IN and WHEN, you can search for all documents that refer to a particular HTML document by following HREF links in the source document. The following syntax can be used:

* <IN> A <WHEN> HREF <SUBSTRING> searchterm

The above query is evaluated in distinct query segments, as follows:

Query segment
Interpreted as
* <IN> A
The expression including the IN operator evaluates any contents (*) in the A tags (zones).
<WHEN> HREF <SUBSTRING> searchterm
The expression including the WHEN operator further qualifies the query for a specified HTML attribute, in this case HREF. The searchterm variable is a word or phrase. The SUBSTRING operator matches the character string you specify with strings in the target HREF.
The SUBSTRING operator can be substituted with the CONTAINS or MATCHES operator. These three operators have different ways of performing string comparisons. For more information about the operators, refer to "Operators."





Copyright © 2001, Verity, Inc. All rights reserved.