Oracle Text Reference Release 9.0.1 Part Number A90121-01 |
|
CONTAINS Query Operators, 27 of 28
Wildcard characters can be used in query expressions to expand word searches into pattern searches. The wildcard characters are:
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:
'scal%'
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:
'_ing'
You can write this query more generally as:
'%ing'
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%
'%benz%'
You can improve wildcard query performance by adding a substring or prefix index.
When your wildcard queries are left- and double-truncated, you can improve query performance by creating a substring index. Substring indexes improve query performance for all types of left-truncated wildcard searches such as %ed, _ing, or %benz%.
When your wildcard queries are right-truncated, you can improve performance by creating a prefix index. A prefix index improves query performance for wildcard searches such as to%.
See Also:
For more information about creating substring and prefix indexes, see "BASIC_WORDLIST" in Chapter 2. |
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|