Elements of Search Syntax
There are several syntax elements that work together in
search.
- About Operator ModesThe Search Service parses queries to determine which operator modes to use for the query.
- Precedence and ParenthesesThe Internet Style mode operators '+' and '-' take precedence over the other search operators. For example, +big dog <order> cat matches all documents that contain the term big, boosting the ranking of any documents that contain any of the three terms dog, or cat.
- PunctuationPunctuation is treated specially in searches.
- Case SensitivityAll searches are case-insensitive, except when the <WORD> operator is used.
- StemmingWord stemming is applied to all individual terms in the search query, except within quoted phrases, or when the <WORD> operator is used. The stemming of query terms means that a query term will match documents containing morphological variants of that term. For example, a search for dogs AND go would match a document containing the terms dog and went. (This example applies to English; stemming employs language-specific information and depends on the user's locale and the language used to index the document.)
- WildcardsThe wildcard operator (*) is used to search for partial matches (prefixes, suffixes, and substrings) of indexed terms.
- Quoted PhrasesA quoted phrase in the user search query matches only documents that contain the given sequence of terms. For instance, a search for "big dog" will not match a document that contains the terms big and dog if it does not contain the phrase big dog.
- Thesaurus ExpansionThesaurus expansion allows a term or phrase in a user’s search to be replaced with a set of custom related terms before the actual search is performed. This feature improves search quality by handling unique, obscure, or industry-specific terminology.
- How Language Settings Apply to SearchDocuments and portal objects are indexed with a language setting that determines how word breaking and stemming are applied. When a user issues a search query, word breaking and stemming are applied according to the user account locale settings. Search results are best when the language used for the search matches the language of the documents being searched. However, searches are normally applied to documents in all languages. Cross-language searches do not benefit from localized stemming and word breaking, but can still return useful results.