Skip navigation links

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

B28329-02


oracle.ultrasearch.query
Class QueryTemplate

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

All Implemented Interfaces:
Query

public class QueryTemplate
extends java.lang.Object
implements Query

Find documents that contains some text within its content, QueryTemplate does not apply to Date or Number attribute.

QueryTemplate operates on the document content. Nevertheless, a match found in the title or url attribute of the document will have higher score than a match in the document content.

Since:
10.2.0

Constructor Summary
QueryTemplate(Query[] query)
          Constructs a QueryTemplate instance, the sequence in Query array will be the sequence in query relaxation, the argument cannot be a n array of QueryTemplate
QueryTemplate(java.lang.String val, InstanceMetaData instmd)
          Constructs a QueryTemplate instance using query string
QueryTemplate(java.lang.String val, Query advancedCondition, InstanceMetaData instmd)
          Constructs a QueryTemplate instance, each query sequence in the QueryTempate will a a logic AND of query string and the advancedCondition, the advancedCondition cannot be a QueryTemplate.

 

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(java.lang.String str, InstanceMetaData instmd, int seq)
          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

QueryTemplate

public QueryTemplate(java.lang.String val,
                     Query advancedCondition,
                     InstanceMetaData instmd)
Constructs a QueryTemplate instance, each query sequence in the QueryTempate will a a logic AND of query string and the advancedCondition, the advancedCondition cannot be a QueryTemplate.

QueryTemplate

public QueryTemplate(java.lang.String val,
                     InstanceMetaData instmd)
Constructs a QueryTemplate instance using query string

QueryTemplate

public QueryTemplate(Query[] query)
Constructs a QueryTemplate instance, the sequence in Query array will be the sequence in query relaxation, the argument cannot be a n array of QueryTemplate

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(java.lang.String str,
                               InstanceMetaData instmd,
                               int seq)
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
seq - the expand sequence
Returns:
the translated Oracle Text query template string (contains clause) <seq>

Skip navigation links

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

B28329-02


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