Skip navigation links

Oracle Secure Enterprise Search Java API Reference
11g Release 1 (11.1.2.0.0)

E14433-02


oracle.search.query.webservice.client
Class OracleSearchService

java.lang.Object
  extended by oracle.search.query.webservice.client.OracleSearchService


public class OracleSearchService
extends Object

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

OracleSearchService

public OracleSearchService()

Method Detail

getOutLinks

public String[] getOutLinks(Integer docID,
                            Integer maxNum,
                            String fedID)
                     throws Exception
Returns an array of outgoing links for a given document.
Parameters:
docID - ID of the document for which outgoing links are returned
maxNum - 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.
Returns:
an array of outgoing links
Throws:
Exception - if any error occurs

submitUrl

public Status submitUrl(String Url)
                 throws Exception
Submits a URL for Oracle SES to crawl and index.
Parameters:
Url - URL to be submitted to Oracle SES to crawl and index. It must be a valid URL and it cannot be null.
Returns:
Status of the request. Status code can be either "successful" or "failed". If the status code is "successful", then the status message is null; otherwise it consists of an error message.
Throws:
Exception - if any error occurs

getCachedPage

public Byte[] getCachedPage(String query,
                            Integer docID,
                            String fedID)
                     throws Exception
Returns cached HTML version of a document. The actual query string is highlighted in the output.

Note: Only first 200KB of the cached version of the document is returned.

Parameters:
query - query string used for search
docID - ID of the document for which the cached content is to be fetched
fedID - ID of the federated instance to which the document belongs
Returns:
byte array of the cached HTML version of the document
Throws:
Exception - if any error occurs

getAttributeLOV

public AttributeLOVElement[] getAttributeLOV(Attribute attribute,
                                             String locale)
                                      throws Exception
Returns a list of value (LOV) for a given search attribute.
Parameters:
attribute - search attribute for which the LOV is requested
locale - a two-letter representation of the locale. The default is English("en") if not set explicitly.
Returns:
an array of AttributeLOV
Throws:
Exception - if any error occurs

getInfoSourceAncestorNodes

public Node[] getInfoSourceAncestorNodes(String nodeID,
                                         String locale)
                                  throws Exception
Returns an array of all the infosource nodes (ancestor nodes) in the full path from the root node to a given infosource node.
Parameters:
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.
Returns:
an array of ancestor nodes
Throws:
Exception - if any error occurs

getInfoSourceNode

public Node getInfoSourceNode(String nodeID,
                              String fedID,
                              String locale)
                       throws Exception
Returns an infosource node for a given node ID.
Parameters:
nodeID - ID of the infosource node to be fetched
fedID - 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.
Returns:
an inforsource node
Throws:
Exception - if any error occurs

getInLinks

public String[] getInLinks(Integer docID,
                           Integer maxNum,
                           String fedID)
                    throws Exception
Returns an array of incoming links for a given document.
Parameters:
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.
Returns:
array of incoming links
Throws:
Exception - if any error occurs

getDataGroups

public DataGroup[] getDataGroups(String locale)
                          throws Exception
Returns an array of all the source groups defined in Oracle SES. It can be used by an application to show all the source groups in the search page, such that end users can restrict their search within one or more source groups.
Parameters:
locale - a two-letter representation of the locale. The default is English ("en") if not set explicitly.
Returns:
an array of data source groups defined in Oracle SES
Throws:
Exception - if any error occurs

doOracleSearch

public 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
Invokes Oracle SES advanced search and returns search results.
Parameters:
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.
Returns:
search results (OracleSearchResult)
Throws:
Exception - if any error occurs

doOracleAdvancedSearch

public 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
Invokes Oracle SES advanced search and returns search results.
Parameters:
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.
Returns:
search results (OracleSearchResult)
Throws:
Exception - if any error occurs

doOracleOrganizedSearch

public 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
Invokes Oracle SES organized search and returns search results.
Parameters:
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.
Returns:
search results (OracleResultContainer)
Throws:
Exception - if any error occurs

doOracleFetchSearch

public OracleResultContainer doOracleFetchSearch(String query,
                                                 String[] targetDocIdList,
                                                 Integer startIndex,
                                                 Integer docsRequested,
                                                 String queryLang,
                                                 String[] fetchAttributeNames,
                                                 GroupAttribute groupAttr,
                                                 SortAttribute[] sortAttrList,
                                                 ClusterConfig[] clusterList)
                                          throws Exception
Invokes Oracle SES fetch search and returns fetch results.
Parameters:
query - query string. The search string should follow Oracle SES query syntax.
targetDocIdList - target doc id list, most likely comes from a cluster node
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.
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.
Returns:
search results (OracleResultContainer)
Throws:
Exception - if any error occurs

getHitCounts

public Integer[] getHitCounts(String[] queryList,
                              DataGroup[] groups,
                              String queryLang,
                              String docLang,
                              String filterConnector,
                              Filter[] filters,
                              Boolean exactCounts,
                              String searchControls)
                       throws Exception
Return hit counts for a batch of SES queries. Note: there is no guarantee that the hit counts returned from this method always match doOracleSearch, because extra processing occurs in doOracleSearch that may introduce additional documents. For example, anchor text is considered when searching web documents, but is not part of the documents themselves. Therefore, doOracleSearch may return documents having matching anchor text, but getHitCounts does not. This method always includes duplicate documents in the hit counts.
Parameters:
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.
Returns:
an integer array containing a hit count for each query
Throws:
Exception - if any error occurs

getInfoSourceNodes

public Node[] getInfoSourceNodes(String parentNodeID,
                                 String fedID,
                                 String locale)
                          throws Exception
Returns all the children nodes of an infosource node.
Parameters:
parentNodeID - ID of the (parent) infosource node for which all the children nodes are returned
fedID - 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.
Returns:
array of nodes
Throws:
Exception - if any error occurs

doOracleSimpleSearch

public OracleSearchResult doOracleSimpleSearch(String query,
                                               Integer startIndex,
                                               Integer docsRequested,
                                               Boolean dupRemoved,
                                               Boolean dupMarked,
                                               Boolean returnCount)
                                        throws Exception
Invokes Oracle SES basic search returns search results.
Parameters:
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.
Returns:
search results (OracleSearchResult)
Throws:
Exception - if any error occurs

getSuggestedContent

public SCElement[] getSuggestedContent(String query,
                                       String returnType)
                                throws Exception
Invokes Oracle SES Suggested Content search only to get the suggested content for the query
Parameters:
query - query string. The search string should follow Oracle SES query syntax.
returnType - either "html" or "xml".
Returns:
SCElement array. Each of them is one provider result.
Throws:
Exception

getUserStats

public oracle.search.query.webservice.client.StatsContainer getUserStats(String[] dataGroupNames,
                                                                         String[] userStatsTypes,
                                                                         String locale)
                                                                  throws Exception
Return user statistics corresponding to the data groups specified
Parameters:
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.
Returns:
user statistics (StatsContainer)
Throws:
Exception - if any error occurs

removeResults

public oracle.search.query.webservice.client.StatsContainer removeResults(String[] ids,
                                                                          String idType,
                                                                          String locale,
                                                                          String ctlParams)
                                                                   throws Exception
Deletes the specified document from the index
Parameters:
ids - an array of Ids, which can be document ids or URLs
idType - the type of the IDs ("docid" or "url")
locale - the locale of the request
ctlParams - an XML string for specifying additional information
Returns:
StatsContainer
Throws:
Exception - if any error occurs

doOracleBrowseSearch

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
Invokes Oracle SES search, restricts the search to a particular infosource node and returns the search results.
Parameters:
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.
Returns:
search results (OracleSearchResult)
Throws:
Exception - if any error occurs

getLanguages

public Language[] getLanguages(String locale)
                        throws Exception
Returns all the languages supported by Oracle SES.
Parameters:
locale - a two-letter representation of the locale. The default is English ("en") if not set explicitly.
Returns:
array of Language
Throws:
Exception - if any error occurs

getAttributes

public Attribute[] getAttributes(String locale,
                                 DataGroup[] groups,
                                 String groupConnector)
                          throws Exception
Returns the list of search attributes that are applied to given source groups.
Parameters:
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.
Returns:
array of Attribute
Throws:
Exception - if any error occurs

getAllAttributes

public Attribute[] getAllAttributes(String locale)
                             throws Exception
Returns all the search attributes available in Oracle SES.
Parameters:
locale - a two-letter representation of the locale. The default is English ("en") if not set explicitly.
Returns:
array of Attribute
Throws:
Exception - if any error occurs

setSearchUser

public Status setSearchUser(String username)
                     throws Exception
Sets the search user. This method works only if the proxy user is already set explicitly through the proxyLogin call.
Parameters:
username - canonical representation of an authenticated user's credential. For example: GUID in Oracle Internet Directory.
Returns:
Status of the request. Status code can be either "successful" or "failed". If the status code is "successful", then the status message is null; otherwise it consists of an error message.
Throws:
Exception - if any error occurs

proxyLogin

public Status proxyLogin(String username,
                         String password,
                         String searchUser)
                  throws Exception
Logs in the end user to Oracle SES using proxy authentication.

The proxy user must be one of the federation trusted entities created on the Oracle SES instance.

Parameters:
username - user name of the proxy user
password - password of the proxy user
searchUser - user name of the end user
Returns:
Status of the request. Status code can be either "successful" or "failed". If the status code is "successful", then the status message is null; otherwise it consists of an error message.
Throws:
Exception - if any error occurs

login

public Status login(String username,
                    String password)
             throws Exception
Logs in the end user to Oracle SES.
Parameters:
username - user name of the end user
password - password of the end user
Returns:
Status of the request. Status code can be either "successful" or "failed". If the status code is "successful", then the status message is null; otherwise it consists of an error message.
Throws:
Exception - if any error occurs

logout

public Status logout()
              throws Exception
Logs out the end user from Oracle SES.
Returns:
Status of the request. Status code can be either "successful" or "failed". If the status code is "successful", then the status message is null; otherwise it consists of an error message.
Throws:
Exception - if any error occurs

logUserClick

public String logUserClick(Integer queryID,
                           Integer urlID,
                           Integer infoSourceID,
                           Integer position,
                           String fedID)
                    throws Exception
Logs user's clicks on the search hits.
Parameters:
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 list
fedID - ID of the federated Oracle SES instance to which the documents belongs.
Returns:
URL of the document that the user clicked on.
Throws:
Exception - if any error occurs

setSessionContext

public Status setSessionContext(SessionContextElement[] sessionContext)
                         throws Exception
Sets the session context to be used for query-time filtering.
Parameters:
sessionContext - array of SessionContextElement
Returns:
Status of the request. Status code can be either "successful" or "failed". If the status code is "successful", then the status message is null; otherwise it consists of an error message.
Throws:
Exception - if any error occurs

getSoapURL

public String getSoapURL()
Gets the URL for the Web service endpoint.
Returns:
Web service endpoint URL

getSearchPort

public Stub getSearchPort()

setSoapURL

public void setSoapURL(String soapURL)
Sets the URL for the Web service endpoint.
Parameters:
soapURL - URL for the Web service endpoint

Skip navigation links

Oracle Secure Enterprise Search Java API Reference
11g Release 1 (11.1.2.0.0)

E14433-02


Copyright © 2006, 2010, Oracle and/or its affiliates. All rights reserved.