Oracle Ultra Search APIs
9.2

oracle.ultrasearch.query
Class Contains

java.lang.Object
  |
  +--oracle.ultrasearch.query.Contains

public class Contains
extends java.lang.Object
implements Query

Find documents that contains some text within its content, or its string attributes. Contains query does not apply to Date or Number attribute.

If no attribute is specified, then Contains operates on the document content, instead of any attribute. Nevertheless, a match found in the title attribute of the document will have higher score than a match in the document content.

Since:
9.0.2

Constructor Summary
Contains(StringAttribute att, java.lang.String val, InstanceMetaData instmd)
          Construct a contains query on a string attribute.
Contains(java.lang.String val, InstanceMetaData instmd)
          Construct a contains query on the document content
 
Method Summary
 java.lang.String compile()
          compile into a query string.
 java.lang.String compileForCount()
          compile into a query string for counting hits.
 java.lang.String expand(StringAttribute att, java.lang.String str, InstanceMetaData instmd)
          Translate an user's attribute contains query string into a text query The default translator uses + and -, see Ultra Search sample query documentation.
 java.lang.String expand(java.lang.String str, InstanceMetaData instmd)
          Translate an user query string into a text query The default translator uses + and -, see Ultra Search sample query documentation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Contains

public Contains(StringAttribute att,
                java.lang.String val,
                InstanceMetaData instmd)
Construct a contains query on a string attribute.

Contains

public Contains(java.lang.String val,
                InstanceMetaData instmd)
Construct a contains query on the document content
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 for counting hits.
Specified by:
compileForCount in interface Query
Returns:
a query string representing this query.

expand

public java.lang.String expand(StringAttribute att,
                               java.lang.String str,
                               InstanceMetaData instmd)
Translate an user's attribute contains query string into a text query The default translator uses + and -, see Ultra Search sample query documentation.
Parameters:
att - a string attribute
str - the main query string
instmd - the InstanceMetaData object
Returns:
the translated Oracle Text query string (contains clause)

expand

public java.lang.String expand(java.lang.String str,
                               InstanceMetaData instmd)
Translate an user query string into a text query The default translator uses + and -, see Ultra Search sample query documentation.
Parameters:
str - the main query string
instmd - the InstanceMetaData object
Returns:
the translated Oracle Text query string (contains clause)

Oracle Ultra Search APIs
9.2