|
Oracle Secure Enterprise Search Java API Reference 10g Release 1 (10.1.8) B32260-01 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.search.query.webservice.client.OracleSearchService
A client proxy class that can be used to access the Oracle Secure Enterprise Search query web service.
Make sure that the Oracle SOAP library (soap.jar) and Oracle SES query web service proxy class library (search_client.jar) are in the Java CLASSPATH
when using the Java proxy.
The following is one example of the use of OracleSearchService:
// Create proxy or stub to access Oracle SES query web service. OracleSearchService stub = new OracleSearchService(); // Set the soap URL (web service endpoint). stub.setSoapURL("http://localhost:7777/search/query/OracleSearch"); // Perform a basic search OracleSearchResult result = stub.doOracleSimpleSearch("oracle", // query string new Integer(1), // start index new Integer(10), // doc requested Boolean.FALSE, // duplicate removed Boolean.FALSE, // duplicate marked Boolean.TRUE); // return estimated hit count // Get estimated hit count int estimatedHitCount = result.getEstimatedHitCount().intValue(); // Process result ResultElement[] resElements = result.getResultElements(); for(int i = 0; i < resElements.length; i++) { System.out.println("Title : " + resElements[i].getTitle()); System.out.println("Snippet : " + resElements[i].getSnippet()); System.out.println("URL : " + resElements[i].getUrl()()); }
Constructor Summary | |
OracleSearchService() |
Method Summary | |
OracleSearchResult |
doOracleBrowseSearch(java.lang.String query, java.lang.String nodeID, java.lang.String fedID, java.lang.Integer startIndex, java.lang.Integer docsRequested, java.lang.Boolean dupRemoved, java.lang.Boolean dupMarked, java.lang.String queryLang, java.lang.String docLang, java.lang.Boolean returnCount, java.lang.Integer[] fetchAttributes) Invokes Oracle SES search, restricting the search to a particular infosource node and returns search results. |
OracleSearchResult |
doOracleSearch(java.lang.String query, java.lang.Integer startIndex, java.lang.Integer docsRequested, java.lang.Boolean dupRemoved, java.lang.Boolean dupMarked, DataGroup[] groups, java.lang.String queryLang, java.lang.String docLang, java.lang.Boolean returnCount, java.lang.String filterConnector, Filter[] filters, java.lang.Integer[] fetchAttributes) Invokes Oracle SES advanced search and returns search results. |
OracleSearchResult |
doOracleSimpleSearch(java.lang.String query, java.lang.Integer startIndex, java.lang.Integer docsRequested, java.lang.Boolean dupRemoved, java.lang.Boolean dupMarked, java.lang.Boolean returnCount) Invokes Oracle SES basic search and returns search results. |
Attribute[] |
getAllAttributes(java.lang.String locale) Returns all the search attributes available in Oracle SES. |
AttributeLOVElement[] |
getAttributeLOV(Attribute attribute, java.lang.String locale) Returns a list of value (LOV) for a given search attribute. |
Attribute[] |
getAttributes(java.lang.String locale, DataGroup[] groups, java.lang.String groupConnector) Returns the list of search attributes that are applied to given source groups. |
java.lang.Byte[] |
getCachedPage(java.lang.String query, java.lang.Integer docID, java.lang.String fedID) Returns cached HTML version of a document. |
DataGroup[] |
getDataGroups(java.lang.String locale) Returns an array of all the source groups defined in Oracle SES. |
Node[] |
getInfoSourceAncestorNodes(java.lang.String nodeID, java.lang.String locale) Returns an array of all the infosource nodes (ancestor nodes) in the full path from the root node to a given infosource node. |
Node |
getInfoSourceNode(java.lang.String nodeID, java.lang.String fedID, java.lang.String locale) Returns an infosource node for a given node ID. |
Node[] |
getInfoSourceNodes(java.lang.String parentNodeID, java.lang.String fedID, java.lang.String locale) Returns all the children nodes of an infosource node. |
java.lang.String[] |
getInLinks(java.lang.Integer docID, java.lang.Integer maxNum, java.lang.String fedID) Returns an array of incoming links for a given document. |
Language[] |
getLanguages(java.lang.String locale) Returns all the languages supported by Oracle SES. |
java.lang.String[] |
getOutLinks(java.lang.Integer docID, java.lang.Integer maxNum, java.lang.String fedID) Returns an array of outgoing links for a given document. |
java.lang.String |
getSoapURL() Gets the URL for the web service endpoint. |
SCElement[] |
getSuggestedContent(java.lang.String query, java.lang.String returnType) Invokes Oracle SES Suggested Content search only to get the suggested content for the query |
Status |
login(java.lang.String username, java.lang.String password) Logs in the end user to Oracle SES. |
Status |
logout() Logs out the end user from Oracle SES. |
java.lang.String |
logUserClick(java.lang.Integer queryID, java.lang.Integer urlID, java.lang.Integer infoSourceID, java.lang.Integer position, java.lang.String fedID) Logs user's clicks on the search hits. |
Status |
proxyLogin(java.lang.String username, java.lang.String password, java.lang.String searchUser) Logs in the end user to Oracle SES using proxy authentication. |
Status |
setSearchUser(java.lang.String username) Sets the search user. |
Status |
setSessionContext(SessionContextElement[] sessionContext) Sets the session context to be used for query-time filtering. |
void |
setSoapURL(java.lang.String soapURL) Sets the URL for the web service endpoint. |
Status |
submitUrl(java.lang.String Url) Submits a URL for Oracle SES to crawl and index. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OracleSearchService()
Method Detail |
public java.lang.String[] getOutLinks(java.lang.Integer docID, java.lang.Integer maxNum, java.lang.String fedID) throws java.lang.Exception
docID
- ID of the document for which outgoing links to be returnedmaxNum
- maximum number of outgoing links to be fetched. The default is 25 if not set explicitly.fedID
- ID of the federated instance to which the document belongs tojava.lang.Exception
- if any error occurspublic Status submitUrl(java.lang.String Url) throws java.lang.Exception
Url
- URL to be submitted to Oracle SES to crawl and index. It must a valid URL and it cannot be null.java.lang.Exception
- if any error occurspublic java.lang.Byte[] getCachedPage(java.lang.String query, java.lang.Integer docID, java.lang.String fedID) throws java.lang.Exception
Note: Only first 200KB of the cached version of the document is returned.
query
- query string used for searchdocID
- ID of the document for which the cached content is to be fetchedfedID
- ID of the federated instance to which the document belongsjava.lang.Exception
- if any error occurspublic AttributeLOVElement[] getAttributeLOV(Attribute attribute, java.lang.String locale) throws java.lang.Exception
attribute
- search attribute for which the LOV is requestedlocale
- a two letter representation of the locale. The default is English("en") if not set explicitly.java.lang.Exception
- if any error occurspublic Node[] getInfoSourceAncestorNodes(java.lang.String nodeID, java.lang.String locale) throws java.lang.Exception
locale
- a two letter representation of the locale. The default is English("en") if not set explicitly.java.lang.Exception
- if any error occurspublic Node getInfoSourceNode(java.lang.String nodeID, java.lang.String fedID, java.lang.String locale) throws java.lang.Exception
nodeID
- ID of the infosource node to be fetchedfedID
- ID of the federated instance to which the infosource node belongs. "-1" for local SES instance. The default is "-1" if not set explicitly.locale
- a two letter representation of the locale The default is English("en") if not set explicitly.java.lang.Exception
- if any error occurspublic java.lang.String[] getInLinks(java.lang.Integer docID, java.lang.Integer maxNum, java.lang.String fedID) throws java.lang.Exception
docID
- ID of the document for which incoming links to be returnedmaxNum
- maximum number of incoming links to be returned. The default is 25 if not set explicitlyfedID
- ID of the federated instance to which the document belongsjava.lang.Exception
- if any error occurspublic DataGroup[] getDataGroups(java.lang.String locale) throws java.lang.Exception
locale
- a two letter representation of the locale. The default is English("en") if not set explicitly.java.lang.Exception
- if any error occurspublic OracleSearchResult doOracleSearch(java.lang.String query, java.lang.Integer startIndex, java.lang.Integer docsRequested, java.lang.Boolean dupRemoved, java.lang.Boolean dupMarked, DataGroup[] groups, java.lang.String queryLang, java.lang.String docLang, java.lang.Boolean returnCount, java.lang.String filterConnector, Filter[] filters, java.lang.Integer[] fetchAttributes) throws java.lang.Exception
query
- query string. The search string should follow Oracle SES query syntax.startIndex
- index of the first document in the hit-list to be returned. The default is 1 if not set explicitly.docsRequested
- maximum number of documents in the hit-list to be returned. The default is 10 if not set explicitly.dupRemoved
- Boolean flag to enable or disable duplicate removal. If turned on, duplicate documents in the hit-list will be removed. The default is false if not set explicitly. Note: The dupMarked switch will have no effect when dupRemoved is turned on.dupMarked
- Boolean flag to enable or disable duplicate detection. The default is false if not set explicitly. Note: The dupMarked switch will have no effect when dupRemoved is turned on.groups
- data source groups that the search will be restricted to. The default is all groups if not set explicitly.queryLang
- language of the query. This is equivalent to Locale. The default is English("en") if not set explicitly. queryLang is used in relevancy boosting.docLang
- language of the documents to restrict the search. If the value is not set explicitly, then search is performed against documents of all the languages.returnCount
- Boolean flag to fetch the total hit count with the result. The default is false if not set explicitly.filterConnector
- connector between all the filters. "and" indicates the documents in the hit-list must satisfy all the filters. "or" indicates the documents in the hit-list must satisfy at least one of the filters. The default is "and" if not set explicitly.filters
- an array of filters. Each filter is a restriction on on the search result. Filters are connected by the filterConnector
. The default is null(no filter applies to the search result) if not set explicitly.fetchAttributes
- array of Integers representing the IDs of custom or non-default attributes to be fetched with the search resultjava.lang.Exception
- if any error occurspublic Node[] getInfoSourceNodes(java.lang.String parentNodeID, java.lang.String fedID, java.lang.String locale) throws java.lang.Exception
parentNodeID
- ID of the (parent) infosource node for which all the children nodes to be returnedfedID
- ID of the federated instance the parent node belongs to. "-1" for local OSES instance. The default is "-1" if not specified explicitly.locale
- a two letter representaion of the locale. The default is English("en") if not set explicitly.java.lang.Exception
- if any error occurspublic OracleSearchResult doOracleSimpleSearch(java.lang.String query, java.lang.Integer startIndex, java.lang.Integer docsRequested, java.lang.Boolean dupRemoved, java.lang.Boolean dupMarked, java.lang.Boolean returnCount) throws java.lang.Exception
query
- query string. The search string should follow Oracle SES query syntax.startIndex
- index of the first document in the hit-list to be returned. The default is 1 if not set explicitly.docsRequested
- maximum number of documents in the hit-list to be returned. The default is 10 if not set explicitly.dupRemoved
- Boolean flag to enable or disable duplicate removal. If turned on, duplicate documents in the hit-list will be removed. The default is false if not set explicitly. Note: The dupMarked switch will have no effext when dupRemoved is turned on.dupMarked
- Boolean flag to enable or disable duplicate detection. The default is false if not set explicitly. Note: The dupMarked switch will have no effext when dupRemoved is turned on.returnCount
- Boolean flag indicating whether to fetch the total hit count with the result. The default is false if not set explicitly.java.lang.Exception
- if any error occurspublic SCElement[] getSuggestedContent(java.lang.String query, java.lang.String returnType) throws java.lang.Exception
query
- query string. The search string should follow Oracle SES query syntax.returnType
- either "html" or "xml".java.lang.Exception
public OracleSearchResult doOracleBrowseSearch(java.lang.String query, java.lang.String nodeID, java.lang.String fedID, java.lang.Integer startIndex, java.lang.Integer docsRequested, java.lang.Boolean dupRemoved, java.lang.Boolean dupMarked, java.lang.String queryLang, java.lang.String docLang, java.lang.Boolean returnCount, java.lang.Integer[] fetchAttributes) throws java.lang.Exception
query
- query string. The search string should follow Oracle SES query syntax.nodeID
- ID of the inforsource node to restrict the search tofedID
- ID of the federated Oracle SES instance the infosource node belongsstartIndex
- index of the first document in the hit-list to be returned. The default is 1 if not set explicitly.docsRequested
- maximum number of documents in hit-list to be returned. The default is 10 if not set explicitly.dupRemoved
- Boolean flag to enable or disable duplicate removal. If turned on, duplicate documents in the hit-list will be removed. The default is false if not set explicitly. Note: The dupMarked switch will have no effext when dupRemoved is turned on.dupMarked
- Boolean flag to enable or disable duplicate detection. The default is false if not set explicitly. Note: The dupMarked switch will have no effext when dupRemoved is turned on.queryLang
- language of the query. This is equivalent to Locale. The default is English("en") if not set explicitly. queryLang is used in relevancy boosting.docLang
- language of the documents to restrict the search. If the value is not set explicitly, then search is performed against documents of all the languages.returnCount
- Boolean flag indicating whether to fetch the total hit count with the result. The default is false if not set explicitly.fetchAttributes
- array of Integers representing the IDs of custom or non-default attributes to be fetched with the search result.java.lang.Exception
- if any error occurspublic Language[] getLanguages(java.lang.String locale) throws java.lang.Exception
locale
- a two letter representation of the locale. The default is English("en") if not set explicitly.java.lang.Exception
- if any error occurspublic Attribute[] getAttributes(java.lang.String locale, DataGroup[] groups, java.lang.String groupConnector) throws java.lang.Exception
locale
- a two letter representation of the locale. The default is English("en") if not set explicitly.groups
- an array of source groups for which the search attributes are requestedgroupConnector
- the connector between all groups. "and" indicates that the search attributes to be returned are intersection of attributes from each group. "or" indicates the search attributes to be returned are union of attributes from each group. The default is "or" of not set explicitly.java.lang.Exception
- if any error occurspublic Attribute[] getAllAttributes(java.lang.String locale) throws java.lang.Exception
locale
- a two letter representation of the locale. The default is English("en") if not set explicitly.java.lang.Exception
- if any error occurspublic Status setSearchUser(java.lang.String username) throws java.lang.Exception
username
- canonical representation of authenticated user's credential. For example: GUID in Oracle Internet Directory.java.lang.Exception
- if any error occurspublic Status proxyLogin(java.lang.String username, java.lang.String password, java.lang.String searchUser) throws java.lang.Exception
The proxy user must be one of the federation trusted entities created on the Oracle SES instance.
username
- user name of the proxy userpassword
- password of the proxy usersearchUser
- user name of the end userjava.lang.Exception
- if any error occurspublic Status login(java.lang.String username, java.lang.String password) throws java.lang.Exception
username
- user name of the end userpassword
- password of the end userjava.lang.Exception
- if any error occurspublic Status logout() throws java.lang.Exception
java.lang.Exception
- if any error occurspublic java.lang.String logUserClick(java.lang.Integer queryID, java.lang.Integer urlID, java.lang.Integer infoSourceID, java.lang.Integer position, java.lang.String fedID) throws java.lang.Exception
queryID
- ID of the submitted queryurlID
- ID of the document that user clicked oninfoSourceID
- ID of the infosource. "-1" is used if not set explicitly.position
- position (rank) of the document in the hit-listfedID
- ID of the federated Oracle SES instance to which the documents belongsjava.lang.Exception
- if any error occurspublic Status setSessionContext(SessionContextElement[] sessionContext) throws java.lang.Exception
sessionContext
- array of SessionContextElementjava.lang.Exception
- if any error occurspublic java.lang.String getSoapURL()
public void setSoapURL(java.lang.String soapURL)
soapURL
- URL for the web service endpoint
|
Oracle Secure Enterprise Search Java API Reference 10g Release 1 (10.1.8) B32260-01 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |