|
Oracle Secure Enterprise Search Java API Reference 11g Release 1 (11.1.2.0.0) E14433-02 |
|||||||||
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
public class 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, restricts the search to a particular infosource node and returns the 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. |
Integer[] |
getHitCounts(String[] queryList, DataGroup[] groups, String queryLang, String docLang, String filterConnector, Filter[] filters, Boolean exactCounts, String searchControls) Return hit counts for a batch of SES queries. |
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. |
Stub |
getSearchPort() |
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 |
oracle.search.query.webservice.client.StatsContainer |
getUserStats(String[] dataGroupNames, String[] userStatsTypes, String locale) Return user statistics corresponding to the data groups specified |
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. |
oracle.search.query.webservice.client.StatsContainer |
removeResults(String[] ids, String idType, String locale, String ctlParams) Deletes the specified document from the index |
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 are 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.Exception
- if any error occurspublic Status submitUrl(String Url) throws Exception
Url
- URL to be submitted to Oracle SES to crawl and index. It must be 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 are returned.locale
- 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. The default is "-1" for local SES instance 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 are returned.maxNum
- maximum number of incoming links to be returned. The default is 25 if not set explicitly.fedID
- ID of the federated instance to which the document belongs.Exception
- 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 follows 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 has 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 has 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 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 result.Exception
- 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 follows 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 has 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 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 result.searchControls
- XML string to specify advanced filter conditions and ranking parameters.Exception
- 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 follows Oracle SES query syntax.topN
- top N search result for grouping, sorting, clustering.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 has 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 has 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 result.searchControls
- XML string to specify advanced filter conditions and ranking parameters.groupAttr
- attribute used for grouping.sortAttrList
- list of sorting attribute setting.clusterList
- list of cluster configurations.Exception
- 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 result.groupAttr
- attribute used for grouping.sortAttrList
- list of sorting attribute setting.clusterList
- list of cluster configurations.Exception
- if any error occurspublic Integer[] getHitCounts(String[] queryList, DataGroup[] groups, String queryLang, String docLang, String filterConnector, Filter[] filters, Boolean exactCounts, String searchControls) throws Exception
queryList
- query strings. The search strings follow Oracle SES query syntax.groups
- data source groups that the search will be restricted to. The default is all groups if not set explicitly.queryLang
- language of the queries. 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.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 the search result. Filters are connected by the filterConnector
. The default is null (no filter applies to the search result) if not set explicitly.exactCounts
- whether to return exact counts. If false, estimated hit counts are returned. The default is false if not set explicitly.searchControls
- XML string to specify additional behavior.Exception
- 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 are returnedfedID
- ID of the federated instance the parent node belongs to. The default is "-1" for the local Oracle SES instance if not specified explicitly.locale
- a two-letter representation 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 follows 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 has no effect 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 oracle.search.query.webservice.client.StatsContainer getUserStats(String[] dataGroupNames, String[] userStatsTypes, String locale) throws Exception
username
- canonical representation of the authenticated user's credential. For example: GUID in Oracle Internet Directory.groups
- an array of source groups for which the statistics are requested.locale
- locale of the request.Exception
- if any error occurspublic oracle.search.query.webservice.client.StatsContainer removeResults(String[] ids, String idType, String locale, String ctlParams) throws Exception
ids
- an array of Ids, which can be document ids or URLsidType
- the type of the IDs ("docid" or "url")locale
- the locale of the requestctlParams
- an XML string for specifying additional informationException
- if any error occurspublic 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 follows Oracle SES query syntax.nodeID
- ID of the inforsource node to restrict the search to.fedID
- ID of the federated Oracle SES instance the infosource node belongs to.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 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 has 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 has no effect 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 requested.groupConnector
- 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 a 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 an 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 query.urlID
- ID of the document that user clicked.infoSourceID
- 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 belongs.Exception
- if any error occurspublic Status setSessionContext(SessionContextElement[] sessionContext) throws Exception
sessionContext
- array of SessionContextElementException
- if any error occurspublic String getSoapURL()
public Stub getSearchPort()
public void setSoapURL(String soapURL)
soapURL
- URL for the Web service endpoint
|
Oracle Secure Enterprise Search Java API Reference 11g Release 1 (11.1.2.0.0) E14433-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |