Advanced Word Search Syntax

Sierra's Advanced Word Search (AWS) syntax offers several tools to help you narrow your search target and enter search strings more efficiently.

Case Sensitivity
Diacritics
Whole versus Partial Words
Wildcards
Adjacency
Boolean Operators
Proximity Operator
Special Characters
Numbers
About Advanced Word Search Index Segments

See Advanced Word Search Index Segments for information on AWS search syntax targeting Index Segments (Slices).

Case Sensitivity

The system converts all alphabetic characters in the search expression to lowercase before the search is performed. Therefore, there is no difference between searching for Jean Baudrillard and jean baudrillard.

Diacritics

Sierra indexes words containing diacritics according to the predominant language of your Sierra system and to indexing choices your library makes about certain letters. For example, in an English-language system, the letter ñ is likely to be indexed as both ñ and n, while in a Spanish-language system, the letter ñ is likely to be indexed only as ñ.

If you enter a search string containing diacritics, Sierra retrieves records based on the indexing. For example, in a Spanish-language system, the search string caña retrieves only records with a tilde over the n, and the search string cana retrieves only records without the tilde over the n. On an English-language system that indexes the letter ñ as both ñ and n, a search for caña is equivalent to a search for cana, and both searches return the same number of results.

The system treats combining diacritics as two characters.

Whole versus Partial Words

The system recognizes search expressions constructed as follows:

For example, a search for time produces only results which contain the whole word time. Therefore, a search for time matches Story Time but does not match Timed Races or Timing Is Everything. The system does not recognize partial words that do not include a wildcard as a match for whole words. For example, a search for tim does not generate a match on the word time.

Wildcards

Search expressions can include the following wildcards:

  ?   Matches any single character in the specified position in the word. For example, anders?n matches both anderson and andersen.

The '?' wildcard functions only after at least two characters. For example, a?derson produces no results, but an?erson matches anderson.
  *   Matches any number of non-space characters, starting at the specified position in the word. For example, "inter*" will match all words that begin with "inter" (e.g., "internal", "internet", "international", etc.). There is no requirement for a minimum number of characters before the wildcard symbol ('*'). Note, however, that if too many matches are made against the wildcarded term, no results are returned.

Wildcard strings can expand to a maximum of 50 characters. For example, a search on "int*" will match Intel, Internet, internal, interesting, integumentary, etc.

Truncation

Use care when truncating a search using a wildcard. These searches are implemented by performing a Boolean OR search using all indexed words that match the pattern. For example, a search for cat* expands to a search for cat OR catalog OR catapult OR catch OR .... Also, because the search engine limits the number of clauses in the expansion to 1024, if the truncated term matches too many keywords, it is considered an error and no results are returned.

Adjacency

The system implicitly inserts the AND Boolean operator between each word in the search expression. When the search is submitted, records that contain all specified words in any order anywhere in the record are retrieved. For example, the search expressions player piano and piano player return the same results set. Note that the RightResult feature ranks records with search terms adjacent to each other higher, so the results for the searches player piano and piano player are presented in different orders.

Adjacency searching can be forced by enclosing the search target in quotes. For example, the search expressions "hard drive" and "drive hard" return different results.

Boolean Operators

You can include the words and, or, and not in the search expression to refine the search or to override word adjacency (see Adjacency above). You can enter these operators in either uppercase, lowercase, or mixed case (e.g., NOT, not, and Not are equivalent). You can enter operators into the search expression using a single-character synonym. The system does not support the before, after, and within operators.

Each operator and its synonym are described below:

and  (Synonym '&')
Use the and operator to retrieve records that contain all of the specified words or phrases in indexed fields. For example, the search expression fractal and geometry (or fractal & geometry) retrieves all records that contain both the words fractal and geometry in indexed fields. Note that the two words need not appear in the same field. For example, the word geometry can appear in the subject field of a given record and the word fractal can appear in the title field of that same record. This search expression retrieves this record, even though the two words do not appear in the same field together.
or  (Synonym '|')
Use the or operator to retrieve records that contain at least one of the specified words or phrases in an indexed field. For example, phobos or deimos (or phobos | deimos) retrieves all records that contain either of these words in an indexed field (though not necessarily in the same field together).
not  (Synonym '!')
Use the not operator is used to modify the results produced by the other Boolean operators (it cannot be used by itself). For example, mercury and not planet (or mercury & ! planet) retrieves records that contain the word mercury, but do not contain the word planet.
Searching for Boolean Operators

To search for Boolean operators as a target of a search, enclose the operator or the entire search term in quotes. For example, to search for the and operator, search for "and". To search for the title Cats and Dogs, search for "Cats and Dogs".

You can combine Boolean operators in a single search expression. For example, a search for politics and mexico and not new retrieves records containing both politics and mexico, but rejects any records that also contain the word new. When using multiple Boolean operators in a search, use parentheses to refine the search and indicate which operation(s) the system should perform first.

For example, a search for ecology and (tacoma or seattle) retrieves records that contain both ecology and tacoma and records that contain both ecology and seattle in indexed fields. The search expression (ecology and tacoma) or (ecology and seattle) retrieves the same set of records.

Proximity Operator

You can use the ~<n> proximity operator to search for two words that occur within a specified number of words of each other in a record. For example, "fractal geometry"~5 specifies that the two words must appear within five words of one another (meaning that up to three words may separate the keywords). You must enclose the keywords in quotes and place the ~<n> operator after the keywords to use this feature. Note that wildcards are not supported with the proximity operator.

Special Characters

The system converts the following punctuation characters to the SPACE character in the search expression:

\ Backslash
@ "at" sign
; Semicolon
` Backtick
$ Dollar sign
. Period
= Equals sign
% Percent sign
, Comma
_ Underscore
/ Forward slash
^ Caret
# Pound sign

Note that if any of the characters in this list are reserved index tags on your system, the system does not recognize the reserved character(s), and a search expression including the reserved character(s) produces no results.

About Colons and Equals Signs

Colons (:) and equals signs (=) are used as part of a search that targets a specific database slice. See More About the Advanced Word Search Index for more information.

Numbers

The system removes commas and periods before indexing or searching, so that the number 1,100,000 is indexed as 1100000. Searches for 1,100,000 or 1100000 return such an entry, but a search for 1 100 000 does not.