Oracle Text Reference
Release 9.0.1

Part Number A90121-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

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

SQL Statements and Operators, 7 of 8


MATCHES

Use this operator to find all rows in a query table that match a given document. The document must be a plain text, HTML, or XML document.

This operator requires a CTXRULE index on your set of queries.

MATCHES returns 1 for one or more matches and 0 for no match.

Syntax

MATCHES(

[schema.]column,
document VARCHAR2 or CLOB,
RETURN NUMBER;
column

Specify the column containing the indexed query set.

document

Specify the document to be classified. The document can be plain-text, HTML, or XML. Binary formats are not supported.

Example

Assuming that a table querytable has a CTXRULE index associated with it, you can issue the following query that passes in a document string to be classified. The SELECT statement returns all rows (queries) that are satisfied by the incoming document:

SELECT classification FROM querytable WHERE MATCHES(text, 'Smith is a common 
name in the United States') > 0;

Related Topics

Syntax for CTXRULE Indextype in this chapter.

Oracle Text Application Developer's Guide


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

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback