Writing Queries
The information below introduces how to write queries using Verity search features, and
covers:
Basic Queries
You can write a basic query using words and phrases, separated by commas. If you want to see
documents about using text editors to create Web documents, you can start with a single-word
query, such as:
- editor
In this case, 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 basic search includes
stemmed variations, such as "editors.") Documents about the Web that did not include the word
"editor" would not be retrieved.
To ask for more specific results, you could enter several words or phrases, separated by commas,
that describe the subject more precisely, such as:
- text editor, document, web
In this case, your query finds documents that contain "text editor," "document," or "Web." (Case
doesn't matter in queries: a word entered in lower case will match words in upper case, lower
case, or mixed case.) The most relevant documents, such as those that discuss creating HTML
documents for the Web using a text editor, will appear at the top of the results list.
Increasing the Power of Your Search
You can make your queries more specific by combining the words you used for basic queries
with operators. Operators are special words that are used to indicate logical relationships between
the descriptive terms that make up your query.
Basic Operators
Here are basic operators that you can specify as part of queries.
NOTE: AND
, OR
, and NOT
are treated as
operators by default, and do not require brackets. If you want to use them as literal words, place
them in double quotes. All other operators must be placed within brackets.
More About Operators
Here are some additional operators that you can specify as part of queries.
Query Examples
Using these examples, you can write queries that will return exactly the information you
want.
Finding Words
Most queries can be written by entering the words and phrases you're interested in, separated by
commas. If you were looking for information about the Web or about using laptop computers,
you could enter:
- web, laptop computers
This query returns documents that contain the terms "Web" (case doesn't matter in queries),
"laptop computers," or both. Your results list will display a ranked list of documents, with the
most relevant documents at the top of the list.
Finding Phrases
Perhaps you want to see documents that refer to a series of words that occur in a specific order,
such as "Web publishing with HTML". You could enter the whole phrase:
- web publishing with html
This query returns only documents that contain all of these words in the exact sequence you
specified, including stemmed variations of the search terms.
Finding a Specific Subject
The simple query returned some documents about the Web, some documents about laptop
computers, and some about both subjects. If your real interest is in accessing the Web using a
laptop computer, you can use the AND
operator to be more specific. You could
enter:
- web AND laptop computers
This query returns only those documents that contain both "Web" and "laptop computers" in the
same document, so this list will be shorter than the results of the query written using commas.
(You can enter AND
in lower case and it will still be treated as an operator.)
AND
is treated as an operator unless it is surrounded by quotation marks. So if
you want to use the word "and" as part of a phrase, place it inside quotation marks. For example,
to search for the phrase "addresses and URLs", you would enter:
addresses "and" URLs
Excluding Terms
You might want to specifically exclude certain documents from your results list. For example,
you might want to see documents about most Web browsers, but you're not interested in Lynx.
You could enter:
- web browser NOT lynx
This query returns only documents referring to Web browsers that do not also mention Lynx. If a
document includes both "Web browser" and "Lynx," it will be excluded.
Copyright © 1997, Verity, Inc. All rights
reserved.