Oracle8i interMedia Text Migration
Release 2 (8.1.6)

Part Number A77061-01

Library

Product

Contents

Index

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

Querying, 6 of 12


Theme Query (English Only)

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.

Pre-8.1 Method

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');

8.1 Method

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 


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

All Rights Reserved.

Library

Product

Contents

Index