Oracle8i interMedia Text Reference
Release 2 (8.1.6)

Part Number A77063-01





Go to previous page Go to beginning of chapter Go to next page

Query Operators, 25 of 26

wildcards (% _)

Wildcard characters can be used in query expressions to expand word searches into pattern searches. The wildcard characters are:

Wildcard Character  Description 


The percent wildcard specifies that any characters can appear in multiple positions represented by the wildcard.  


The underscore wildcard specifies a single position in which any character can occur. 


When a wildcard expression translates to a stopword, the stopword is not included in the query and not highlighted by CTX_DOC.HIGHLIGHT or CTX_DOC.MARKUP

Right-Truncated Queries

Right truncation involves placing the wildcard on the right-hand-side of the search string.

For example, the following query expression finds all terms beginning with the pattern scal:


Left- and Double-Truncated Queries

Left truncation involves placing the wildcard on the left-hand-side of the search string.

To find words such as king, wing or sing, you can write your query as follows:


You can write this query more generally as:


You can also combine left-truncated and right-truncated searches to create double-truncated searches. The following query finds all documents that contain words that contain the substring %benz%


Improving Double-Truncated Query Performance

When your wildcard queries are left- and double-truncated, you can improve query performance by creating a substring index. Substring indexes improve the query performance for all types of left-truncated wildcard searches such as %ed, _ing, or %benz%.

See Also:

For more information about creating substring indexes, see "BASIC_WORDLIST" in Chapter 3.  

Go to previous page Go to beginning of chapter Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.