Oracle Text Reference Release 9.0.1 Part Number A90121-01 |
|
CONTAINS Query Operators, 6 of 28
Use the broader term operators (BT, BTG, BTP, BTI) to expand a query to include the term that has been defined in a thesaurus as the broader or higher level term for a specified term. They can also expand the query to include the broader term for the broader term and the broader term for that broader term, and so on up through the thesaurus hierarchy.
Specify the operand for the broader term operator. Oracle expands term to include the broader term entries defined for the term in the thesaurus specified by thes. For example, if you specify BTG(dog), the expansion includes only those terms that are defined as broader term generic for dog.
The number of broader terms included in the expansion is determined by the value for level.
Specify a qualifier for term, if term is a homograph (word or phrase with multiple meanings, but the same spelling) that appears in two or more nodes in the same hierarchy branch of thes.
If a qualifier is not specified for a homograph in a broader term query, the query expands to include the broader terms of all the homographic terms.
Specify the number of levels traversed in the thesaurus hierarchy to return the broader terms for the specified term. For example, a level of 1 in a BT query returns the broader term entry, if one exists, for the specified term. A level of 2 returns the broader term entry for the specified term, as well as the broader term entry, if one exists, for the broader term.
The level argument is optional and has a default value of one (1). Zero or negative values for the level argument return only the original query term.
Specify the name of the thesaurus used to return the expansions for the specified term. The thes argument is optional and has a default value of DEFAULT. A thesaurus named DEFAULT must exist in the thesaurus tables if you use this default value.
The following query returns all documents that contain the term tutorial or the BT term defined for tutorial in the DEFAULT thesaurus:
'BT(tutorial)'
When you specify a thesaurus name, you must also specify level as in:
'BT(tutorial, 2, mythes)'
If machine is a broader term for crane (building equipment) and bird is a broader term for crane (waterfowl) and no qualifier is specified for a broader term query, the query
BT(crane)
expands to:
'{crane} or {machine} or {bird}'
If waterfowl is specified as a qualifier for crane in a broader term query, the query
BT(crane{(waterfowl)})
expands to the query:
'{crane} or {bird}'
You can browse a thesaurus using procedures in the CTX_THES package.
.
See Also:
For more information on browsing the broader terms in your thesaurus, see CTX_THES.BT in Chapter 10, "CTX_THES Package". |
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|