Skip navigation links

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

B28329-01


oracle.ultrasearch.query
Class Request

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


public class Request
extends java.lang.Object

A search request to Ultra Search.

Since:
10.1.0.2

Constructor Summary
Request()
          construct a request for searching an Ultra Search instance.

 

Method Summary
 Attribute[] getAttributesFetched()
          get the document attributes to fetch with the result
 java.lang.String getBoostTerm()
          get the relevancy boosting term
 java.util.Locale getDocLanguage()
          get the document language to limit the search.
 int getDocsRequested()
          get the number of documents to fetch
 java.lang.String getEllipsisMark()
          get the ellipsis marking used for excerpt computation.
 java.lang.String getEndTag()
          get the highlighting end tag The highlighting tag is used to highlight string attribute values and the document's excerpt.
 int getExcerptLength()
          get the length of the document excerpt to compute
 Query getFilter()
          get the filtering condition on the result.
 StringAttribute[] getHiliteAttributes()
          get the list of string attributes to highlight
 Query getQuery()
          get the query clause of request
 java.util.Locale getQueryLanguage()
          get the language of the query
 int getStartIndex()
          get the start index of the range of documents to fetch.
 java.lang.String getStartTag()
          get the highlighting start tag The highlighting tag is used to highlight string attribute values and the document's excerpt.
 boolean isRemoveDuplicates()
          true if remove duplicates in the result
 boolean isWithCount()
          true if return total count with result
 void setAttributesFetched(Attribute[] newAttributesFetched)
          set the document attributes to fetch with the result
 void setBoostTerm(java.lang.String newBoostTerm)
          set the relevancy boosting term
 void setDocLanguage(java.util.Locale newDocLanguage)
          set the document language to limit the search
 void setDocsRequested(int newDocsRequested)
          set the number of documents to fetch
 void setEllipsisMark(java.lang.String newEllipsisMark)
          set the ellipsis marking used for excerpt computation.
 void setEndTag(java.lang.String newEndTag)
          set the highlighting end tag The highlighting tag is used to highlight string attribute values and the document's excerpt.
 void setExcerptLength(int newExcerptLength)
          set the length of the document excerpt to compute 0 means excerpt will not be computed.
 void setFilter(Query newFilter)
          set the filtering condition on the result.
 void setHiliteAttributes(StringAttribute[] newHiliteAttributes)
          set the list of string attributes to highlight
 void setQuery(Query newQuery)
          set the query clause of the request
 void setQueryLanguage(java.util.Locale newQryLocale)
          set the language of the query
 void setRemoveDuplicates(boolean newRemoveDuplicates)
          turn on/off duplicate removal in the result
 void setStartIndex(int newStartIdx)
          set the start index of the range of documents to fetch
 void setStartTag(java.lang.String newStartTag)
          set the highlighting start tag The highlighting tag is used to highlight string attribute values and the document's excerpt.
 void setWithCount(boolean newWithCount)
          turn on/off total count with result

 

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

 

Constructor Detail

Request

public Request()
construct a request for searching an Ultra Search instance.

Method Detail

getQuery

public Query getQuery()
get the query clause of request
Returns:
a query object

setQuery

public void setQuery(Query newQuery)
set the query clause of the request
Parameters:
newQuery - a query object

getQueryLanguage

public java.util.Locale getQueryLanguage()
get the language of the query
Returns:
a locale object

setQueryLanguage

public void setQueryLanguage(java.util.Locale newQryLocale)
set the language of the query
Parameters:
newQryLocale - the query language locale

getStartIndex

public int getStartIndex()
get the start index of the range of documents to fetch.
Returns:
the index number, 1 means the first document.

setStartIndex

public void setStartIndex(int newStartIdx)
set the start index of the range of documents to fetch
Parameters:
newStartIdx - the index number, >= 1

getDocsRequested

public int getDocsRequested()
get the number of documents to fetch
Returns:
the number of documents to fetch, >= 1

setDocsRequested

public void setDocsRequested(int newDocsRequested)
set the number of documents to fetch
Parameters:
newDocsRequested - the number of documents to fetch, >=1

getDocLanguage

public java.util.Locale getDocLanguage()
get the document language to limit the search.
Returns:
the locale of document language

setDocLanguage

public void setDocLanguage(java.util.Locale newDocLanguage)
set the document language to limit the search
Parameters:
newDocLanguage - the locale of document language

getAttributesFetched

public Attribute[] getAttributesFetched()
get the document attributes to fetch with the result
Returns:
the array of Attribute objects

setAttributesFetched

public void setAttributesFetched(Attribute[] newAttributesFetched)
set the document attributes to fetch with the result
Parameters:
newAttributesFetched - the array of Attribute objects

getBoostTerm

public java.lang.String getBoostTerm()
get the relevancy boosting term
Returns:
the relevancy boosting term, null allowed

setBoostTerm

public void setBoostTerm(java.lang.String newBoostTerm)
set the relevancy boosting term
Parameters:
newBoostTerm - the relevancy boosting term, null allowed

isWithCount

public boolean isWithCount()
true if return total count with result
Returns:
true if total count is returned with result false otherwise

setWithCount

public void setWithCount(boolean newWithCount)
turn on/off total count with result
Parameters:
newWithCount - true to turn on total count with result

isRemoveDuplicates

public boolean isRemoveDuplicates()
true if remove duplicates in the result
Returns:
true if duplicates are removed from the result, false otherwise

setRemoveDuplicates

public void setRemoveDuplicates(boolean newRemoveDuplicates)
turn on/off duplicate removal in the result
Parameters:
newRemoveDuplicates - true to turn on duplicate removal in the result

getFilter

public Query getFilter()
get the filtering condition on the result. A filter is a query contraint that limits the number of documents returned. But it does not affect score, excerpt, highlighting; whereas a query does. Each document is check against the query conditions and the filtering conditions. If a hit is found, its score is computed only based on the query clause.
Returns:
the filtering condition, null allowed

setFilter

public void setFilter(Query newFilter)
set the filtering condition on the result. A filter is a query contraint that limits the number of documents returned. But it does not affect score, excerpt, highlighting; whereas a query does. Each document is check against the query conditions and the filtering conditions. If a hit is found, its score is computed only based on the query clause.
Parameters:
newFilter - the filtering condition, null allowed

getHiliteAttributes

public StringAttribute[] getHiliteAttributes()
get the list of string attributes to highlight
Returns:
array of StringAttributes, null allowed

setHiliteAttributes

public void setHiliteAttributes(StringAttribute[] newHiliteAttributes)
set the list of string attributes to highlight
Parameters:
newAttributesHighlighted - array of StringAttributes, null alllowed

getStartTag

public java.lang.String getStartTag()
get the highlighting start tag The highlighting tag is used to highlight string attribute values and the document's excerpt.
Returns:
the tag string, null allowed

setStartTag

public void setStartTag(java.lang.String newStartTag)
set the highlighting start tag The highlighting tag is used to highlight string attribute values and the document's excerpt.
Parameters:
newStartTag - the tag string, null allowed

setEndTag

public void setEndTag(java.lang.String newEndTag)
set the highlighting end tag The highlighting tag is used to highlight string attribute values and the document's excerpt.
Parameters:
newEndTag - the tag string, null allowed

getEndTag

public java.lang.String getEndTag()
get the highlighting end tag The highlighting tag is used to highlight string attribute values and the document's excerpt.
Returns:
the tag string, null allowed

getExcerptLength

public int getExcerptLength()
get the length of the document excerpt to compute
Returns:
excerpt length in characters, >= 0

setExcerptLength

public void setExcerptLength(int newExcerptLength)
set the length of the document excerpt to compute 0 means excerpt will not be computed. 4000 characters is the max for document excerpt.
Parameters:
newExcerptLength - excerpt length in characters, >=0.

setEllipsisMark

public void setEllipsisMark(java.lang.String newEllipsisMark)
set the ellipsis marking used for excerpt computation. e.g. "..." When computing document excerpt, parts of the document are omitted and replaced using the ellipsis mark. If null, then the default is to use "...". Ellipsis mark is not used for highlighting within string attributes, only for excerpt.
Parameters:
newEllipsisMark - the ellipsis mark string, null allowed.

getEllipsisMark

public java.lang.String getEllipsisMark()
get the ellipsis marking used for excerpt computation. e.g. "..." When computing document excerpt, parts of the document are omitted and replaced using the ellipsis mark. If null, then the default is to use "...".
Returns:
the ellipsis mark string, null allowed.

Skip navigation links

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

B28329-01


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