Syntax Options


Following is a summary of Verity query language syntax options, including alternative syntax and topics, that you can use to compose query expressions. These syntax options are available for simple and explicit queries.

Using Shorthand Notation

The Verity query language provides a few alternatives you can use to specify evidence operators. In the examples below, "word" represents the word to be located.

.
Standard Query Expression
Equivalent Format
<MANY><WORD>word
"word"


<MANY><STEM>word
'word'


Specifying Topic Names Explicitly

You can specify topics in expressions in a variety of ways. Use any of the following formats to specify a topic explicitly in an expression:

{topic_name}

<TOPIC>topic_name

<TOPIC>(topic_name)

{KB:topic_name}

In the examples above, topic_name represents the name of the topic used in the expression. KB represents the name of the knowledge base used in the expression.

Assigning Importance (Weights) to Search Terms

You can assign a weight to each search term in a query to indicate each search term's relative importance. The weight assignment is expressed as a number between 01 and 100, where 01 represents the very lowest importance rating and 100 represents the very highest importance rating.

To specify a weight with a search term, enter the weight in brackets just before the search term, as shown below:

[50]test, [80]help

For the above example, the search engine looks for stemmed variations of the words "test" and "help" and assigns a weight of 50 to the term "test" and a weight of 80 to the term "help." Search results with the highest density of stemmed variations of the term "help" would receive the highest possible scores.

Using explicit syntax, you could enter a query expression with weights as follows:

<ACCRUE> ([50]<WORD>(test), [80]<WORD>(help))

Searching Fields for Null Values

The search engine supports searching for fields that have a null value. This means that you can perform the basic search and find all of the documents that have a null value for a particular field. You can also search for fields that are populated with a non-null value.

The methods for searching for null or populated field values are indicated in the following table.

Syntax
Description
fieldname = ""
This syntax is used to search for documents that have a null value for the field named fieldname. The value for fieldname must be a valid Verity field. If the field name given does not exist for a document, meaning the field is not defined for the document's collection, it does not match the query.
fieldname != ""
Used to search for documents that have some value for the field named fieldname. The value for fieldname must be a valid Verity field. If the field name given does not exist for a document, meaning the field is not defined for the document's collection, it does not match the query.





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