Narrower Term (NT, NTG, NTP, NTI)
Use the narrower term operators (NT, NTG, NTP, NTI) to expand a query to include all the terms that have been defined in a thesaurus as the narrower or lower level terms for a specified term.
They can also expand the query to include all of the narrower terms for each narrower term, and so on down through the thesaurus hierarchy.
Syntax
| Syntax | Description |
|---|---|
| NT(term[(qualifier)][,level][,thes]) | Expands a query to include all the lower level terms defined in the thesaurus as narrower terms for term. |
| NTG(term[(qualifier)][,level][,thes]) | Expands a query to include all the lower level terms defined in the thesaurus as narrower generic terms for term. |
| NTP(term[(qualifier)][,level][,thes]) | Expands a query to include all the lower level terms defined in the thesaurus as narrower partitive terms for term. |
| NTI(term[(qualifier)][,level][,thes]) | Expands a query to include all the lower level terms defined in the thesaurus as narrower instance terms for term. |
term
Specify the operand for the narrower term operator. term is expanded to include the narrower term entries defined for the term in the thesaurus specified by thes. The number of narrower terms included in the expansion is determined by the value for level. You cannot specify expansion operators in the term argument.
qualifier
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 narrower term query, the query expands to include all of the narrower terms of all homographic terms.
level
Specify the number of levels traversed in the thesaurus hierarchy to return the narrower terms for the specified term. For example, a level of 1 in an NT query returns all the narrower term entries, if any exist, for the specified term. A level of 2 returns all the narrower term entries for the specified term, as well as all the narrower term entries, if any exist, for each narrower 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.
thes
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.
Note: If you specify thes, then you must also specify level.
Examples for Narrower Term Operators
The following query returns all documents that contain either the term cat or any of the NT terms defined for cat in the DEFAULT thesaurus:
'NT(cat)'
If you specify a thesaurus name, then you must also specify level as in:
'NT(cat, 2, mythes)'
The following query returns all documents that contain either fairy taleor any of the narrower instance terms for fairy taleas defined in the DEFAULT thesaurus:
'NTI(fairy tale)'
That is, if the terms cinderella and little mermaid are defined as narrower term instances for fairy tale, Oracle Text returns documents that contain fairy tale, cinderella, or little mermaid.
Notes
Each hierarchy in a thesaurus represents a distinct, separate branch, corresponding to the four narrower term operators. In a narrower term query, Oracle Text only expands the query using the branch corresponding to the specified narrower term operator.
Related Topic
CTX_THES.NT in CTX_THES Package for more information on browsing the narrower terms in your thesaurus