Which of the following operators allows you to search for an exact phrase?

This section describes each Verity operator in detail. Where appropriate, each description includes an example of simple syntax and explicit syntax. Operators are listed alphabetically.



Selects documents that include at least one of the search elements you specify. Valid search elements are two or more words or phrases. Retrieved documents are relevance-ranked.

The operator scores retrieved documents according to the presence of each search element in the document using "the more, the better" approach: the more search elements found in the document, the better the document's score. Following are examples of search syntax.

To select documents containing stemmed variations of the words "computers" and "laptops," you can enter any of the following:

  • computerslaptops
  • computers, laptops
  • (computers, laptops)


and

Selects documents that contain all of the search elements you specify. Documents retrieved using the and operator are relevance-ranked. Following are examples of search syntax.

To select documents which contain stemmed variations of the phrase "pharmaceutical companies" and stemmed variations of the word "stock," you can enter the following:

pharmaceutical companies and stock

Only those documents that contain both search elements, or stemmed variations of them (for example, "pharmaceutical company," "stocks," etc.), are retrieved and ranked according to their scores.



Selects documents by matching the word or phrase you specify with values stored in a specific document field. Documents are selected only if the search elements specified appear in the same sequential and contiguous order in the field value. When you use the operator, you specify the field name to search, and the word or phrase to search for.

With the operator, the words stored in a document field are interpreted as individual, sequential units. You can specify one or more of these units as search criteria. To specify multiple words, each word must be sequential and contiguous, and must be separated by a blank space.

For example, the following title contains eight sequential words:

American Version of 'Orient Express' Offers Opulent Ride

  1. American
  2. Version
  3. of
  4. Orient
  5. Express
  6. Offers
  7. Opulent
  8. Ride

The following examples demonstrate how you can use the operator with sequential, contiguous words to match the document title listed above, assuming it is stored in a title field:

titleAmerican Version

titleExpress Offers

The following examples show how you can use a question mark (?) to represent individual variable characters of a word, and an asterisk (*) to match multiple variable characters of a word:

titleAmer* Version

titleVersion of Or????

Question marks and asterisks cannot be used to represent white space that appears between words.

The operator does not recognize nonalphanumeric characters. The operator interprets nonalphanumeric characters as spaces and treats the separated values as individual units.

For example, if you have defined a dash (-) as a valid character, and you enter search criteria that include this character, as in on-line, the value is defined as two individual units, as follows:

titleon line



Selects documents by matching the character string you specify with the ending characters of the values stored in a specific document field. For example, assume a document field named author has been defined. To select documents written by Milner, Wagner, and Faulkner, you can enter the following:

authorner



= (equals)

Selects documents whose document field values are exactly the same as the search string you specify. For example, assume a document field named date has been defined. To select only those documents dated October 24, 1992, you can enter the following:

date = 10-24-92



> (greater than)

Selects documents whose document field values are greater than the search string you specify. For example, assume a document field named date has been defined. To select only those documents dated after October 24, 1992, you can enter the :

date > 10-24-92



>= (greater than or equal to)

Selects documents whose document field values are greater than or equal to the search string you specify. For example, assume a document field named date has been defined. To select only those documents dated on or after October 24, 1992, you can enter the following:

date >= 10-24-92



< (less than)

Selects documents whose document field values are less than the search string you specify. For example, assume a document field named date has been defined. To select only those documents dated before February 14, 1991, you can enter the :

date < 02-14-91



<= (less than or equal to)

Selects documents whose document field values are less than or equal to the search string you specify. For example, assume a document field named date has been defined. To select only those documents dated prior to and including February 14, 1991, you can enter the following:

date <= 02-14-91



Selects documents that contain specified values in one or more document zones. A document zone represents a region of a document, such as the document's summary, date, or body text. The operator works only if document zones have been defined in your collections. If you use the operator to search collections in which zones are not defined, no documents will be selected. In addition, the zone name you specify must match the zone names defined in your collections. Consult your collection administrator to determine which zones have been defined for specific collections.

The operator can be qualified with the operator, to search for a term only within the one or more zones upon which certain conditions have been placed. Use of the when operator is described below.

The following query expression searches document zones named summary for the word safety.

"safety"summary

To search with multiple words, phrases, or topics enclose them in parentheses. The following query expression searches document zones named summary for the word safety and stemmed variations of the word warning.

("safety", warning)summary

To search multiple zones, separate them with commas and enclose them in parentheses. The following query expression searches both the summary zone and the title zone for the word safety and stemmed variations of the word warning.

("safety", warning)(summary, title)

You must enclose query expressions containing commas in parentheses. The following example searches the summary zone for the word safety and stemmed variations of the phrase environmental regulation.

("safety", environmental regulation)summary

The following query expression searches both the summary zone and the title zone for the word safety and stemmed variations of the phrase environmental regulation.

("safety", environmental regulation)(summary, title)



Selects documents by matching the character string you specify with values stored in a specific document field. Documents are selected only if the search elements specified match the field value exactly. If a partial match is found, a document is not selected. When you use the operator, you specify the field name to search, and the word, phrase, or number to search for.

Unlike the operator, the search criteria you specify with a operator must match the field value exactly for a document to be selected. With the operator, any occurrence of a search string that appears as a portion of a value is not selected; only values matching the entire search string are selected.

You can use question marks (?) to represent individual variable characters within a string, and asterisks (*) to match multiple characters within a string.

For example, assume a document field named source includes the following values:

computer

computerworld

computer currents

pc computing

To locate documents whose source is computer, the operator is used as follows:

sourcecomputer

Here, the operator matches computer, but not computerworld, computer currents, or pc computing.

To locate documents whose source is computerworld, the operator is used as follows:

sourcecomputer?????

Now, the operator matches computerworld, since each question mark (?) represents specific character positions within the string. computer and computer currents are not matched, because their character strings do not match the length represented by the specific character positions.

To locate documents whose sources are computer, computerworld, and computer currents, the operator is used as follows: sourcecomputer*

Here, the operator matches computer, computerworld, and computer currents, since the asterisk (*) represents zero or more variable characters at the end of the string.

To locate documents whose sources include computer, computerworld, computer currents, and pc computing, the operator can be used as follows: source*comput*

Now, the operator matches all four occurrences, since the asterisk (*) represents a string of characters of any length.



Selects documents containing specified search terms within close proximity to each other. Document scores are calculated based on the relative number of words between search terms. For example, if the search expression includes two words, and those words occur next to each other in a document (so that the region size is two words long), then the score assigned to that document is 1.0. Thus, the document with the smallest possible region containing all search terms always receives the highest score. Documents whose search terms are not within 1000 words of each other are not selected, since the search terms are probably too far apart to be meaningful within the context of the document.

The near operator is similar to the other proximity operators in the sense that the search words you enter must be found within close proximity of one another. However, unlike other proximity operators, the near operator calculates relative proximity and assigns scores based on its calculations.

To retrieve relevance-ranked documents that contain stemmed variations of the words "war" and "peace" within close proximity to each other, you can enter the following: warpeace



Selects documents containing two or more words within N number of words of each other, where N is an integer. Document scores are calculated based on the relative distance of the specified words when they are separated by N words or less.

For example, if the search expression near/5 is used to find two words within five words of each other, a document that has the specified words within three words of each other is scored higher than a document that has the specified words within five words of each other.

The N variable can be an integer between 1 and 1,024, where near/1 searches for two words that are next to each other. If N is 1,000 or above, you must specify its value without commas, as in near/1000. You can specify multiple search terms using multiple instances of near/N, as long as the value of N is the same.

For example, to retrieve relevance-ranked documents that contain stemmed variations of the words "commute," "bicycle," "train," and "bus" within 10 words of each other, you can enter the following: commutebicycletrainbus

You can use the near/N operator with the order modifier to duplicate the behavior of the phrase operator. For example, to search for documents containing the phrase "world wide web," you can use the following syntax: worldwideweb

Which search operator should be used to search for an exact phrase?

To search for an exact phrase (where the words are in a specific order), type quotation marks around your search terms.

What is a phrase search operator?

Search operators are used to refine a search when a simple keyword search provides too many unwanted results. Although the exact functionality of each search engine is determined by its developers, phrase searching is normally accomplished by wrapping the desired phrase in quotation marks.

Which operator is used in text searching?

Use the $text query operator to perform text searches on a collection with a text index. $text will tokenize the search string using whitespace and most punctuation as delimiters, and perform a logical OR of all such tokens in the search string.

What are the 3 operators that can be used in search terms?

The three most commonly used operators are AND, OR, NOT. These are known as Boolean operators. They can be used to broaden or narrow a search and to exclude unwanted search terms and concepts. You can type these operators in between your search terms (Fig.