Oracle8i interMedia Text Migration Release 2 (8.1.6) Part Number A77061-01 |
|
Querying, 6 of 12
A theme query is a query on a concept. The query string is usually a concept or theme that represents the idea to be searched on. Oracle returns the documents that contain the theme.
In pre-8.1, you issue a theme query by first creating a theme policy to create a separate theme index. You then specify the theme policy in the CONTAINS procedure.
In 8.1, a single Text index contains word and theme information. You issue theme queries using the ABOUT operator.
To issue a theme query, you first index your text column with a policy that has a theme lexer associated with it. To issue the query, you specify the same theme policy and the string for the theme query.
For example, assuming that THEME_POL is a theme policy, you retrieve all documents about the theme of insects using a two-step query as follows:
execute ctx_query.contains('THEME_POL', 'insects', 'CTX_TEMP');
Word information and theme information are combined into a single index. To issue a theme query, your index must have a theme component.
See Also:
For more information about creating a theme component to your index, see Chapter 5, "Indexing". |
You issue a theme query using the ABOUT operator inside the query expression. For example, to retrieve all documents that are about insects, write your query as follows:
SELECT SCORE(1), title FROM news WHERE CONTAINS(text, 'about(insects)', 1) > 0 ORDER BY SCORE(1) DESC;
See Also:
For more information about using the ABOUT operator, see Oracle8i interMedia Text Reference |
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|