|
Oracle Secure Enterprise Search Java API Reference 10g Release 1 (10.1.8.2) E10465-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 |
doOracleAdvancedSearch(String query, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, DataGroup[] groups, String queryLang, String docLang, Boolean returnCount, String filterConnector, Filter[] filters, Integer[] fetchAttributes, String searchControls) Invokes Oracle SES advanced search and returns search results. |
OracleSearchResult |
doOracleBrowseSearch(String query, String nodeID, String fedID, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, String queryLang, String docLang, Boolean returnCount, Integer[] fetchAttributes) Invokes Oracle SES search, restricting the search to a particular infosource node and returns search results. |
OracleResultContainer |
doOracleFetchSearch(String query, String[] targetDocIdList, Integer startIndex, Integer docsRequested, String queryLang, String[] fetchAttributeNames, GroupAttribute groupAttr, SortAttribute[] sortAttrList, ClusterConfig[] clusterList) Invokes Oracle SES fetch search and returns fetch results. |
OracleResultContainer |
doOracleOrganizedSearch(String query, Integer topN, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, DataGroup[] groups, String queryLang, String docLang, Boolean returnCount, String filterConnector, Filter[] filters, String[] fetchAttributeNames, String searchControls, GroupAttribute groupAttr, SortAttribute[] sortAttrList, ClusterConfig[] clusterList) Invokes Oracle SES organized search and returns search results. |
OracleSearchResult |
doOracleSearch(String query, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, DataGroup[] groups, String queryLang, String docLang, Boolean returnCount, String filterConnector, Filter[] filters, Integer[] fetchAttributes) Invokes Oracle SES advanced search and returns search results. |
OracleSearchResult |
doOracleSimpleSearch(String query, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, Boolean returnCount) Invokes Oracle SES basic search returns search results. |
Attribute[] |
getAllAttributes(String locale) Returns all the search attributes available in Oracle SES. |
AttributeLOVElement[] |
getAttributeLOV(Attribute attribute, String locale) Returns a list of value (LOV) for a given search attribute. |
Attribute[] |
getAttributes(String locale, DataGroup[] groups, String groupConnector) Returns the list of search attributes that are applied to given source groups. |
Byte[] |
getCachedPage(String query, Integer docID, String fedID) Returns cached HTML version of a document. |
DataGroup[] |
getDataGroups(String locale) Returns an array of all the source groups defined in Oracle SES. |
Node[] |
getInfoSourceAncestorNodes(String nodeID, 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(String nodeID, String fedID, String locale) Returns an infosource node for a given node ID. |
Node[] |
getInfoSourceNodes(String parentNodeID, String fedID, String locale) Returns all the children nodes of an infosource node. |
String[] |
getInLinks(Integer docID, Integer maxNum, String fedID) Returns an array of incoming links for a given document. |
Language[] |
getLanguages(String locale) Returns all the languages supported by Oracle SES. |
String[] |
getOutLinks(Integer docID, Integer maxNum, String fedID) Returns an array of outgoing links for a given document. |
String |
getSoapURL() Gets the URL for the web service endpoint. |
SCElement[] |
getSuggestedContent(String query, String returnType) Invokes Oracle SES Suggested Content search only to get the suggested content for the query |
Status |
login(String username, String password) Logs in the end user to Oracle SES. |
Status |
logout() Logs out the end user from Oracle SES. |
String |
logUserClick(Integer queryID, Integer urlID, Integer infoSourceID, Integer position, String fedID) Logs user's clicks on the search hits. |
Status |
proxyLogin(String username, String password, String searchUser) Logs in the end user to Oracle SES using proxy authentication. |
Status |
setSearchUser(String username) Sets the search user. |
Status |
setSessionContext(SessionContextElement[] sessionContext) Sets the session context to be used for query-time filtering. |
void |
setSoapURL(String soapURL) Sets the URL for the web service endpoint. |
Status |
submitUrl(String Url) Submits a URL for Oracle SES to crawl and index. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OracleSearchService()
Method Detail |
public String[] getOutLinks(Integer docID, Integer maxNum, String fedID) throws 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 toException
- if any error occurspublic Status submitUrl(String Url) throws Exception
Url
- URL to be submitted to Oracle SES to crawl and index. It must a valid URL and it cannot be null.Exception
- if any error occurspublic Byte[] getCachedPage(String query, Integer docID, String fedID) throws 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 belongsException
- if any error occurspublic AttributeLOVElement[] getAttributeLOV(Attribute attribute, String locale) throws 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.Exception
- if any error occurspublic Node[] getInfoSourceAncestorNodes(String nodeID, String locale) throws Exception
nodeID
- ID of the infosource node for which all ancestor nodes to be returnedlocale
- a two letter representation of the locale. The default is English("en") if not set explicitly.Exception
- if any error occurspublic Node getInfoSourceNode(String nodeID, String fedID, String locale) throws 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.Exception
- if any error occurspublic String[] getInLinks(Integer docID, Integer maxNum, String fedID) throws 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 belongsException
- if any error occurspublic DataGroup[] getDataGroups(String locale) throws Exception
locale
- a two letter representation of the locale. The default is English("en") if not set explicitly.Exception
- if any error occurspublic OracleSearchResult doOracleSearch(String query, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, DataGroup[] groups, String queryLang, String docLang, Boolean returnCount, String filterConnector, Filter[] filters, Integer[] fetchAttributes) throws 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 resultException
- if any error occurspublic OracleSearchResult doOracleAdvancedSearch(String query, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, DataGroup[] groups, String queryLang, String docLang, Boolean returnCount, String filterConnector, Filter[] filters, Integer[] fetchAttributes, String searchControls) throws 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 resultsearchControls
- xml string to specify advanced filter conditions and ranking parametersException
- if any error occurspublic OracleResultContainer doOracleOrganizedSearch(String query, Integer topN, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, DataGroup[] groups, String queryLang, String docLang, Boolean returnCount, String filterConnector, Filter[] filters, String[] fetchAttributeNames, String searchControls, GroupAttribute groupAttr, SortAttribute[] sortAttrList, ClusterConfig[] clusterList) throws Exception
query
- query string. The search string should follow Oracle SES query syntax.topN
- top N search result for grouping/sorting/clusteringstartIndex
- 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.fetchAttributeNames
- array of names of custom or non-default attributes to be fetched with the search resultsearchControls
- xml string to specify advanced filter conditions and ranking parametersgroupAttr
- attribute used for groupingsortAttrList
- list of sorting attribute settingclusterList
- list of cluster configurationsException
- if any error occurspublic OracleResultContainer doOracleFetchSearch(String query, String[] targetDocIdList, Integer startIndex, Integer docsRequested, String queryLang, String[] fetchAttributeNames, GroupAttribute groupAttr, SortAttribute[] sortAttrList, ClusterConfig[] clusterList) throws Exception
query
- query string. The search string should follow Oracle SES query syntax.targetDocIdList
- target doc id list, most likely comes from a cluster nodestartIndex
- 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.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.fetchAttributeNames
- array of names of custom or non-default attributes to be fetched with the search resultgroupAttr
- attribute used for groupingsortAttrList
- list of sorting attribute settingclusterList
- list of cluster configurationsException
- if any error occurspublic Node[] getInfoSourceNodes(String parentNodeID, String fedID, String locale) throws 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.Exception
- if any error occurspublic OracleSearchResult doOracleSimpleSearch(String query, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, Boolean returnCount) throws 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.Exception
- if any error occurspublic SCElement[] getSuggestedContent(String query, String returnType) throws Exception
query
- query string. The search string should follow Oracle SES query syntax.returnType
- either "html" or "xml".Exception
public OracleSearchResult doOracleBrowseSearch(String query, String nodeID, String fedID, Integer startIndex, Integer docsRequested, Boolean dupRemoved, Boolean dupMarked, String queryLang, String docLang, Boolean returnCount, Integer[] fetchAttributes) throws 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.Exception
- if any error occurspublic Language[] getLanguages(String locale) throws Exception
locale
- a two letter representation of the locale. The default is English("en") if not set explicitly.Exception
- if any error occurspublic Attribute[] getAttributes(String locale, DataGroup[] groups, String groupConnector) throws 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.Exception
- if any error occurspublic Attribute[] getAllAttributes(String locale) throws Exception
locale
- a two letter representation of the locale. The default is English("en") if not set explicitly.Exception
- if any error occurspublic Status setSearchUser(String username) throws Exception
username
- canonical representation of authenticated user's credential. For example: GUID in Oracle Internet Directory.Exception
- if any error occurspublic Status proxyLogin(String username, String password, String searchUser) throws 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 userException
- if any error occurspublic Status login(String username, String password) throws Exception
username
- user name of the end userpassword
- password of the end userException
- if any error occurspublic Status logout() throws Exception
Exception
- if any error occurspublic String logUserClick(Integer queryID, Integer urlID, Integer infoSourceID, Integer position, String fedID) throws 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 belongsException
- if any error occurspublic Status setSessionContext(SessionContextElement[] sessionContext) throws Exception
sessionContext
- array of SessionContextElementException
- if any error occurspublic String getSoapURL()
public void setSoapURL(String soapURL)
soapURL
- URL for the web service endpoint
|
Oracle Secure Enterprise Search Java API Reference 10g Release 1 (10.1.8.2) E10465-01 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |