Skip navigation links

Oracle® Ultra Search Java API Reference
11g Release 1 (11.1)

B28329-02


oracle.ultrasearch.query
Class CtxContains

java.lang.Object
  extended by oracle.ultrasearch.query.CtxContains

All Implemented Interfaces:
Query

public class CtxContains
extends java.lang.Object
implements Query

Construct a Query object based on any Oracle Text query string. Oracle Text offers many linguistic features, such as thesaurus (SYN), theme (ABOUT), soundex (!), stemming ($), in its query language. Any valid Oracle Text query can be used as an Ultra Search query by constructing a CtxContains object.

Because CtxContains implements Query interface, it can be combined with any Ultra Search query objects using And/Or, and executed using the Instance.getResult method.

For example, to use stemming on the word "cat":

Query qry = new CtxContains ("$cat");

Or, to use synonym for "dog" in document title searching:

StringAttribute title = instanceMetaData.getStringAttribute("TITLE");
Query qry = new CtxContains ("SYN(dog)", title);

Since:
9.0.4
See Also:
Instance.getResult(oracle.ultrasearch.query.Request)

Constructor Summary
CtxContains(java.lang.String textQuery)
          Construct a query object using a Oracle Text query string.
CtxContains(java.lang.String textQuery, StringAttribute att)
          Construct a query object on a StringAttribute using a Oracle Text query string.

 

Method Summary
 java.lang.String compile()
          compile into a query string.
 java.lang.String compileForCount()
          compile into a query string.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

CtxContains

public CtxContains(java.lang.String textQuery)
Construct a query object using a Oracle Text query string. The resulting object's compile() method will return the input textQuery string.
Parameters:
textQuery - a valid Oracle Text CONTAINS query expression.

CtxContains

public CtxContains(java.lang.String textQuery,
                   StringAttribute att)
Construct a query object on a StringAttribute using a Oracle Text query string. The resulting object's compile() method will return the input textQuery string, rewritten for the String Attribute's section.
Parameters:
textQuery - a valid Oracle Text CONTAINS query expression.
att - a Ultra Search String attribute

Method Detail

compile

public java.lang.String compile()
compile into a query string.
Specified by:
compile in interface Query
Returns:
a query string representing this query.

compileForCount

public java.lang.String compileForCount()
compile into a query string. return value same as compile().
Specified by:
compileForCount in interface Query
Returns:
a query string representing this query.

Skip navigation links

Oracle® Ultra Search Java API Reference
11g Release 1 (11.1)

B28329-02


Copyright © 2002,2008, Oracle. All Rights Reserved.