Appendix A: Oracle Database Special Characters and Reserved Words

The Override Advanced Shopper Search Syntax (SHOP_OVERRIDE_ADV_SEARCH_SYNTAX) parameter on the Application Parameters page, when set to True, is used to define the logic used in the Shopper (SHOP) page for the ‘Search For’ search string. For an Oracle database, upon searching, the system captures any instance of an asterisk (*) in the search string and replaces it (in the background) with the % symbol before submitting the query to the database. For example, if you search for *PAPER*, the system submits the query as %PAPER%. In addition, the system looks at the Shop Search Characters to Escape (SHOP_SEARCH_ESCAPE_CHARS) parameter to identify the characters that should be escaped in the search string. For example, if you enter a value of “!%$-&”, the system will escape all five characters, !, %, $, -, &. The system inserts a backslash (\) character in front of any character listed in SHOP_SEARCH_ESCAPE_CHARS parameter which is found in the SHOP ‘Search For’ search string. For example, if you search for TEST-DOC-MA, the system submits the query as TEST\-DOC\-MA.

Sources

http://docs.oracle.com/cd/E11882_01/text.112/e24436/cqspcl.htm#i1006256

Reserved Word

Reserved Character

Operator

Expanded Information

ABOUT

(none)

ABOUT

to search for transactions that are about soccer: 'about(soccer)'

ACCUM

,

Accumulate

to search for at least one occurrence of the query terms with assigned weights for relevancy

AND

&

And

to search for at least one occurrence of each of the query terms

BT

(none)

Broader Term

to expand a query to include the term defined in the thesaurus as a broader term for term

BTG

(none)

Broader Term Generic

to expand a query to include all terms defined in the thesaurus as broader generic terms for term

BTI

(none)

Broader Term Instance

to expand a query to include all the terms defined in the thesaurus as broader instance terms for term

BTP

(none)

Broader Term Partitive

to expand a query to include all the terms defined in the thesaurus as broader partitive terms for term

EQUIV

=

Equivalence

to specify an acceptable substitution for a word in a query

FUZZY

?

fuzzy

to expand queries to include words that are spelled similarly to the specified term

(none)

{}

escape characters (multiple)

to escape a string of characters or symbols such that everything inside a set of braces is part of the escape sequence; escaping a single character causes the escaped character to become a separate token in the query; use }} to include the close brace in the expression

(none)

\

escape character single

to escape a single character or symbol such that only the character immediately following the backslash is escaped; use \\ to indicate the backslash character

(none)

()

grouping characters

to group terms and operators found between the characters

(none)

[]

grouping characters

to group terms and operators found between the characters but to prevent penetrations for the expansion operators (fuzzy, soundex, and stem)

HASPATH

(none)

HASPATH

to find all XML transactions that contain a specified section path; index must be created with the PATH_SECTION_GROUP for the operator to work.

INPATH

(none)

INPATH

to do path searching in XML transactions; index must be created with the PATH_SECTION_GROUP for the operator to work.

MINUS

-

MINUS

to search for transactions that contain one query term such that the presence of a second query term causes a lower search rank

NEAR

;

NEAR

to return a search score based on the proximity of two or more query items; higher scores result from query items that are physically closer together

NOT

~

NOT

to search for transactions that contain one query and not another

NT

(none)

Narrower Term

to expand a query to include all the lower level terms defined in the thesaurus as narrower terms for term

NTG

(none)

Narrower Term Generic

to expand a query to include all the lower level terms defined in the thesaurus as narrower generic terms for term

NTI

(none)

Narrower Term Instance

to expand a query to include all the lower level terms defined in the thesaurus as narrower instance terms for term

NTP

(none)

Narrower Term Partitive

to expand a query to include all the lower level terms defined in the thesaurus as narrower partitive terms for term

OR

|

OR

to search for transactions that contain at least one occurrence of any of the query items

PT

(none)

Preferred Term

to replace a term in a query with the preferred term that has been defined in a thesaurus for the term

RT

(none)

Related Term

to expand a query to include all related terms that have been defined in a thesaurus for the term

(none)

$

stem

to search for terms that have the same linguistic root as the query term

(none)

!

soundex

to expand queries to include words that have similar sounds

SQE

(none)

Stored Query Expression

to call a stored query expression created with the CTX_QUERY.STORE_SQE procedure

SYN

(none)

Synonym

to expand a query to include all the terms that have been defined in a thesaurus as synonyms for the specified term

(none)

threshold

at the expression level to eliminate transactions in the result set that search score below a threshold number; at the query term level to select a transaction based on how a term scores in the transaction

TR

(none)

Translation Term

to expand a query to include all defined foreign language equivalent terms

TRSYN

(none)

Translation Term Synonym

to expand a query to include all the defined foreign equivalents of the query term, the synonyms of query term, and the foreign equivalents of the synonyms

TT

(none)

Top Term

to replace a term in a query with the top term that has been defined for the term in the standard hierarchy (BT, BT) in a thesaurus

(none)

*

weight

to multiply the search score by a given factor for a query item

(none)

%

wildcard character (multiple)

to specify that any characters can appear in multiple positions represented by the wildcard

(none)

_

wildcard character (single)

to specify a single position in which any character can occur

WITHIN

(none)

WITHIN

to narrow a query down into transaction tabs (zone tabs, field tabs, attributes tabs, sentence tabs, or paragraph tabs)0

 

 

 

 

 

 

 

 

There are different groups of precedence orders.

 

Precedence order #1 (operators)

 

 

 

 

EQUIV (=)

 

 

 

NEAR (;)

 

 

 

weight (*), threshold (>)

 

 

 

MINUS (-)

 

 

 

NOT (~)

 

 

 

WITHIN

 

 

 

AND (&)

 

 

 

OR (|)

 

 

 

ACCUM (,)

 

 

 

 

 

 

 

 

 

 

Precedence order #2 (operators and characters)

 

 

 

 

Wildcard Characters

 

 

 

ABOUT

 

 

 

stem ($)

 

 

 

Fuzzy

 

 

 

soundex (!)

 

 

 

 

 

 

 

 

 

 

Precedence order #3 (other operators)

 

 

 

 

no sense of precedence

 

 

 

 

 

 

 

 

 

Precedence can be altered by using the grouping characters: (, ), [, and ].

 

w1 & w2 | w3 as opposed to w1 & (w2 | w3)