|
Oracle Ultra Search Java API Reference 9.0.3 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ultrasearch.query.Instance
An instance to search on.
A search instance defines a connection to the database backend. From the instance object, attributes, groups, and attribute LOVs can be fetched from using getMetaData method. Searches can be performed using getResult method. Additional URLs can be added to the database backend for future crawling and indexing using the submitUrl method.
The meta-data information is cached to avoid round-trips to the database backend. The cache refresh interval is an adjustable property. The default interval is at most every 15 mins.
Instance also performs URL substitution for email, table, or file documents. By substituting the beginning portion of a URL to point to an established web application, users can browse email, table and file documents found in the search result.
InstanceMetaData
, Attribute
, Group
, AttributeLOV
Constructor Summary | |
Instance() Construct an instance for searching. |
Method Summary | |
void |
clearCache() Empty the meta-data cache, so the next call to getMetaData() will need to connect to the backend. |
int |
estimateHitCount(Query query, java.util.Locale qryLang, java.util.Locale docLang) Estimate the total number of hits for a query. |
java.sql.Connection |
getConnection() Get the Connection object used to connect to this instance. |
java.lang.String |
getFilePagePath() Gets the URL path of the web application (JSP or Servlet) that will render the contents of a file. |
java.lang.String |
getInstanceName() Get the instance name is used. |
java.lang.String |
getMailPagePath() Gets the URL path of the web application (JSP or Servlet) that will render the contents of an email. |
InstanceMetaData |
getMetaData() Get the meta data associated with the query instance. |
int |
getRefreshInterval() Gets the interval by which meta data is refreshed. |
Result |
getResult(Query query, java.util.Locale qryLang, int startPointer, int docsRequested, java.util.Locale docLanguage, Attribute[] atts, java.lang.String terms, boolean withCount) Get the result for a query. |
java.lang.String |
getTablePagePath() Gets the URL path of the web application (JSP or Servlet) that will render the contents of a table row cell. |
boolean |
isCloseConnection() Tests to see if connections are closed after each use. |
void |
setCloseConnection(boolean close) Control if the connections should be closed after each use. |
void |
setConnection(java.sql.Connection conn) Set the Connection used to connect to this instance. |
void |
setFilePagePath(java.lang.String str) Sets the URL path of the web application (JSP or Servlet) that will render the contents of a file row cell. |
void |
setInstanceName(java.lang.String inst) Set the instance name that should be used. |
void |
setMailPagePath(java.lang.String str) Sets the URL path of the web application (JSP or Servlet) that will render the contents of an email. |
void |
setRefreshInterval(int mins) Sets the interval by which the QueryInstance refresh groups, attributes, and LOVs from the database backend. |
void |
setTablePagePath(java.lang.String str) Sets the URL path of the web application (JSP or Servlet) that will render the contents of a table row cell. |
void |
submitUrl(java.lang.String url) Submit an URL to be included in the instance. |
void |
submitUrlToDataSource(java.lang.String url, java.lang.String ds_name) Submit an URL to be included in a data source. |
void |
submitUrlToGroup(java.lang.String url, java.lang.String groupName) Submit an URL to be included in a group. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Instance()
Method Detail |
public void setConnection(java.sql.Connection conn)
conn
- a JDBC 2.0 Connection object that is an OracleConnection.public void setCloseConnection(boolean close)
close
- true for close after each use, false otherwise.public boolean isCloseConnection()
public java.sql.Connection getConnection() throws java.sql.SQLException
public void setInstanceName(java.lang.String inst)
inst
- the instance name, can be null if user has exactly 1 instance.public java.lang.String getInstanceName()
public void setTablePagePath(java.lang.String str)
str
- a portion of a URL string representing the table rendering application.public java.lang.String getTablePagePath()
public void setFilePagePath(java.lang.String str)
str
- a portion of a URL string representing the file rendering application.public java.lang.String getFilePagePath()
public void setMailPagePath(java.lang.String str)
str
- a portion of a URL string representing the mail rendering application.public java.lang.String getMailPagePath()
public InstanceMetaData getMetaData() throws java.sql.SQLException
public int estimateHitCount(Query query, java.util.Locale qryLang, java.util.Locale docLang) throws java.sql.SQLException
query
- the query object, not null.qryLang
- the language of the query string, not nulldocLang
- the language of the document, use null to include documents of all languages.public Result getResult(Query query, java.util.Locale qryLang, int startPointer, int docsRequested, java.util.Locale docLanguage, Attribute[] atts, java.lang.String terms, boolean withCount) throws java.sql.SQLException
query
- the query object, not null.qryLang
- the language of the query string, not nullstartPointer
- The first document of the hit list to obtain. For example, specifying 3 means that the first two documents will be ignored.docsRequested
- The number of documents to be returned.docLanguage
- the document language, use null to include all languages.atts
- the document attributes to retrieve.terms
- the terms used to boost document scoringwithCount
- whether to include the hit count estimate in the resultpublic void submitUrl(java.lang.String url) throws SubmitURLException, java.sql.SQLException
url
- the URL string.public void submitUrlToDataSource(java.lang.String url, java.lang.String ds_name) throws SubmitURLException, java.sql.SQLException
url
- the URL string.public void submitUrlToGroup(java.lang.String url, java.lang.String groupName) throws SubmitURLException, java.sql.SQLException
url
- the URL string.public int getRefreshInterval()
public void setRefreshInterval(int mins)
mins
- the interval in minutes. Value of 0 disables caching.public void clearCache()
|
Oracle Ultra Search Java API Reference 9.0.3 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |