Skip Headers
Oracle® Secure Enterprise Search Administrator's Guide
11g Release 2 (11.2.2)

Part Number E23427-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Oracle Secure Enterprise Search Web Services APIs

Oracle SES includes the following Web Services APIs:

See Also:

Oracle Secure Enterprise Search Web Services APIs let you write your own application to search and administer Oracle SES over the network. The APIs provide the following benefits:

Oracle SES also provides the client-side Java proxies for marshalling and parsing Web Services SOAP messages. Client applications can use the library instead of creating SOAP requests and parsing SOAP responses by themselves to access Oracle SES Web Services.

This section contains the following topics:

Web Services APIs Installation

Oracle SES Web Services runs on Oracle WebLogic Server. They are installed and configured as part of the default installation. You can use Oracle SES Web Services immediately. Follow the same middle tier administration steps to start and stop Oracle SES Web Services. Note that the Query Web Service client API should be run in version JDK 1.6 or higher.

WebLogic provides a default Oracle SES Web Services administrator console. The administrator console URL matches the Oracle SES Web Services URL.

Query Web Services Location

The Query Web service is located at the following address for an Oracle SES installation:

http://host:port/search/query/OracleSearch

For example, if your Oracle SES middle tier is running on host myhost and the port number is 8888, then the Query Web Services URL is the following:

http://myhost:8888/search/query/OracleSearch

You can obtain the following information from the administrator console:

  • Oracle SES Query WSDL description

  • List of Web Services messages and operations

  • Client-side Java proxies and source codes

Administration Web Services Location

The Administration Web service is located at the following address for an Oracle SES installation:

http://host:port/search/api/admin/AdminService.

You can obtain the following information from the administrator console:

  • Oracle SES Administration WSDL description

  • List of Web Services messages and operations

  • Client-side JavaScript stub

Web Services Concepts

Oracle SES Web Services consists of a remote procedure call (RPC) interface to Oracle SES that enables the client application to invoke operations on Oracle SES over the network. The client application uses WSDL specification published by Oracle SES Web Services URL to send a request message using Simple Object Access Protocol (SOAP). The server then responds to the client application with a SOAP response message.

This section explains the following concepts:

Web Services

A Web Service is a software application identified by a URI whose interfaces and binding are capable of being defined, described, and discovered by XML artifacts. A Web Service supports direct interactions with other software applications using XML-based messages and internet-based products.

A Web Service does the following:

  • Exposes and describes itself: A Web Service defines its functionality and attributes so that other applications can understand it. By providing a WSDL file, a Web Service makes its functionality available to other applications.

  • Allows other services to locate it on the Web: A Web Service can be registered in a UDDI registry so that applications can locate it.

  • Can be invoked: After a Web Service has been located and examined, the remote application can invoke the service using an Internet standard protocol.

  • Web Services are of either request and response or one-way style, and they can use either synchronous or asynchronous communication. However, the fundamental unit of exchange between Web Services clients and Web Services, of either style or type of communication, is a message.

Simple Object Access Protocol

The Simple Object Access Protocol (SOAP) is a lightweight XML-based protocol for exchanging information in a decentralized distributed environment. SOAP supports different styles of information exchange, including RPC-oriented and message-oriented exchange. RPC style information exchange allows for request-response processing, where an endpoint receives a procedure-oriented message and replies with a correlated response message. Message-oriented information exchange supports organizations and applications that must exchange messages or other types of documents where a message is sent, but the sender might not expect or wait for an immediate response. Message-oriented information exchange is also called document style exchange.

SOAP has the following features:

  • Protocol independence

  • Language independence

  • Platform and operating system independence

  • Support for SOAP XML messages incorporating attachments (using the multipart MIME structure)

Web Services Description Language

The Web Services Description Language (WSDL) is an XML format for describing network services containing RPC-oriented and message-oriented information. Programmers or automated development tools can create WSDL files to describe a service and can make the description available over the Internet. Client-side programmers and development tools can use published WSDL specifications to obtain information about available Web Services and to build and create proxies or program templates that access available services.

Web Services Architecture

Oracle SES Web Services is powered by Oracle WebLogic Server. The implementation, configuration, and deployment of Oracle SES Web Services follow the procedures and standards provided by Oracle WebLogic Server.

Oracle SES WSDL defines the operations and messages for Oracle SES Web Services. The message exchange of Oracle SES Web Services is RPC style, in which the contents of the SOAP message body conform to a structure that specifies a procedure and includes a set of parameters or a response with a result and any additional parameters.

Oracle SES SOAP messages use HTTP binding where a SOAP message is embedded in the body of a HTTP request and a SOAP message is returned in the HTTP response.

The following diagram illustrates the architecture of Oracle SES Web Services:

Description of benri001.gif follows
Description of the illustration benri001.gif

Development Platforms

You can implement client applications using platforms that support SOAP, such as Oracle JDeveloper, Microsoft .NET, or Apache Axis. These platforms allow you to automatically create code using the Oracle SES WSDL interface. Include the generated code along with the application logic to create a request, invoke the Web Services, and interpret the response.

Query Web Services Common Data Types

This section contains the following topics:

Base Data Types

Oracle Secure Enterprise Search Web Services use the following base data types:

Table 11-1 Base Data Types

Base Type Description Example

xsd:Boolean

Boolean

true, false

xsd:dateTime

Date

2005-12-31

xsd:int

Integer

256

xsd:long

Long integer

12345678900

xsd:string

String

Oracle Secure Enterprise Search


XML-to-Java Data Type Mappings

The mapping between XML schema data types and Java data types depends on the SOAP development environment. The following table shows mappings for the Oracle JDeveloper environment:

Table 11-2 XML-to-Java Type Mappings

XML Schema Oracle JDeveloper

xsd:Boolean

java.lang.Boolean

xsd:dateTime

java.util.Date

xsd:int

java.lang.Integer

xsd:long

java.lang.Long

xsd:string

java.lang.String


Complex Types

Oracle SES Web Services uses the following complex data types:

OracleSearchResult

The search result container. It has the following elements:

  • returnCount: A Boolean value indicating whether the result includes the count estimate for the hit list.

  • estimatedHitCount: The estimated count of the search result; -1 means the search result does not return the estimated hit count.

  • dupRemoved: A Boolean value indicating whether near duplicate documents have been removed from search result.

  • dupMarked: A Boolean value indicating whether near duplicate documents have been marked in the search result. If dupRemoved is true, then dupMarked is always false.

  • resultElements: An array of resultElement, which represents the actual hit list.

  • suggestedLinks: An array of suggestedLink for the given search.

  • query: The actual search string, which uses Oracle SES query syntax.

  • altKeywords: Alternate keywords (suggestions) for a given search. If you set switch ses.qapp.multiple_alternate_keywords to true, then multiple alternate keywords are returned for a search term. The following terms are returned:

    • ALTERNATE_SPELLING: Contains alternate words from the dictionary.

    • EXPANDED_QUERY: Contains keywords from the alternate keywords page when Auto-Expand is selected. These keywords are automatically included in the query that is sent to Oracle Text.

    • ALTERNATE_QUERY: Contains keywords from the alternate keywords page when Auto-Expand is not selected.

  • startIndex: The start index of search results.

  • docsReturned: The number of search matches returned.

ResultElement

This is the data type for search result element. It has the following elements:

  • author: Primary author of the document

  • description: Description of the document

  • url: URL of the document

  • snippet: Keywords in context (KWIC) of the document

  • title: Title of the document

  • lastModified: Last modified date of the document

  • mimetype: Mime type of the document

  • score: Oracle Text score of the document

  • docID: Document ID

  • language: Language of the document

  • contentLength: Content length of the document

  • signature: Signature of the document

  • infoSourceID: InfoSource ID of the document

  • infoSourcePath: InfoSource path of the document

  • groups: Array of groups to which the document belongs

  • isDuplicate: Boolean value indicating whether this document is a near duplicate of another document in the result list

  • hasDuplicate: Boolean value indicating whether this document has one or more near duplicates in the result list

  • fedID: Federated instance ID, used to track which federated instance the document is fetched from

  • customAttributes: Array of custom nondefault attributes extracted from/for the document during crawling

    CustomAttribute encapsulates the name and value of the custom (user-defined) attribute. The name of the attribute is represented by actual name and type of the attribute in name_type format. For example, the string attribute foo is represented as foo_STRING. All Date attributes use the format mm/dd/yyyy.

SCElement

Suggested content from a provider. It has the following elements:

  • name: name of the suggested content provider

  • content: suggested content from the provider. The content is a byte array of the XML or HTML content

DataGroup

The source group. It has the following elements:

  • groupID: Source group ID

  • groupName: Source group name

  • groupDisplayName: Display name for the source group

Attribute

The data type for search attribute. It has the following elements:

  • id: Search attribute ID

  • name: Internal name of search attribute

  • displayName: Display name of search attribute

  • type: The search attribute type. Value is either number, string, or date.

Filter

The data type for filter condition (predicate). It has the following elements:

  • attributeId: Search attribute ID

  • attributeType: Search attribute type. Value is either number, string, or date.

  • operator: Operator of the filter condition

    • If attributeType is string, then it should be either equals or contains.

    • If attributeType is number or date, then it should be either greaterthan, greaterthanequals, lessthan, lessthanequals, or equals.

  • attributeValue: Value of the filter condition (predicate)

    • For string type attribute, the value is simply the string itself.

    • For number type attribute, the value should be represented by a string consisting of an optional sign, (+) or (-), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction.

    • For date type attribute, the value should be in the format mm/dd/yyyy, where mm is the month (01~12), dd is the date (01~31), yyyy is the year (for example, 2005)

Examples:

  • If the filter condition is Title contains Oracle Secure Enterprise Search, then the client application must look up the attribute ID of search attribute Title and include the following (element, value) pairs:

    • attributeID = 1 (assuming the search attribute id of Title is 1)

    • operator = contains

    • attributeValue = Oracle Secure Enterprise Search

  • If the filter condition is Price greater than 1000, then the client application must look up the attribute ID of search attribute Price and include the following (element, value) pairs:

    • attributeID = 2 (assuming the search attribute id of 'Price' is 2)

    • operator = greaterthan

    • attributeValue = 1000

Node

This is the data type for the infosource node. It has the following elements:

  • id: Infosource node ID

  • fedId: Federated instance ID, used to track which federated instance the node belongs to

  • name: Name of the node

  • docCount: Number of documents under the node. If the value is –1, then there exists documents under the node but the count cannot be shown.

  • hasChildren: Indicates if the node has any children

  • fullpath: Full path of the category node

  • fullpathIds: The IDs of each node in the full path

AttributeLOVElement

This is the element of AttributeLOV, the list of search attribute values. It has the following elements:

  • value: Attribute value (internal value)

  • displayValue: Display value

SessionContextElement

This data structure is used to store authentication information for the search user in the form of a name-value pair, which can be used during query-time authorization filtering of the results. It has the following elements:

  • name: Name of the authentication attribute

  • value: Value of the authentication attribute

Status

This is the status of the request. It has the following elements:

  • status: Status code. Value is either successful or 'ailed

  • message: Status message. Value is null, or an error message if the status is 'ailed

Language

This is the language data type. It has the following elements:

  • languageName: Name of the language

  • languageDisplayName: Display name (translated name) of the language

Array Types

Oracle Secure Enterprise Search Web Services uses the following complex array types:

  • AttributeArray: Array of Attribute

  • AttributeLOVElementArray: Array of AttributeLOVElement

  • CustomAttributeArray: Array of CustomAttribute

  • SCElementArray: Array of SCElement

  • DataGroupArray: Array of DataGroup

  • FilterArray: Array of Filter

  • IntArray: Array of int

  • LanguageArray: Array of Language

  • NodeArray: Array of Node

  • ResultElementArray: Array of ResultElement

  • SessionContextElementArray: Array of SessionContextElement

  • StringArray: Array of String

Query Web Services Operations

This section contains the following topics:

Overview of Query Web Services Operations

Oracle Secure Enterprise Search provides the following categories of Web Services operations:

  • Authentication: Authenticates a user's access to Oracle SES. The operation is only required if the user performs secure search.

  • Search: Runs a search on Oracle SES and obtains a hit list along with information such as estimated hit count, near duplicate documents in the result list, suggested links, and alternate keywords for the search. Gets suggested content from external providers for the given query. You can also customize the default Oracle SES ranking to create a more relevant search result list for your enterprise or configure clustering for customized Oracle SES applications.

  • Metadata: Obtains the search metadata, such as the list of source groups, the list of supported languages, or the list of search attributes.

  • Search Hit: Obtains the search result details, such as the cached version of search result and in-links and out-links of the search hit.

  • User Feedback: Sends user feedback to Oracle SES, such as user-submitted URLs.

Authentication Operations

This section describes the following authentication operations:

loginRequest Message

Requests Oracle SES to authenticate the search user. It consists of the following parameters:

  • username: User name for the search user. This value is not case-sensitive.

  • password: Password for the search user

<message name="loginRequest">
   <part name="username"      type="xsd:string"/>
   <part name="password"      type="xsd:string"/>
</message>

loginResponse Message

Contains the return status for the loginRequest message.

<message name="loginResponse">
   <part name="return"      type="typens:Status"/>   
</message>

logoutRequest Message

Used when the user logs out from the search application.

<message name="logoutRequest">
</message>

logoutResponse Message

Contains the return status for the logoutRequest message.

<message name="logoutResponse">
   <part name="return"      type="typens:Status"/>   
</message>

setSessionContextRequest Message

Passes authentication information for the search user, which can be used during query-time filtering. It consists of the following parameter:

  • sessionContext: An array of SessionContextElement. This array stores the authentication information needed for the query-time authentication filtering in the form of name-value pairs.

<message name="setSessionContextRequest">
    <part name="sessionContext"     type="typens:SessionContextElementArray"/>
</message>

Note:

Login and logout Web Services calls cause Oracle SES to automatically set or reset the AUTH_USER value in the session context that is passed to the query-time filter. This session context attribute cannot be overwritten explicitly through the setSessionContext call.

setSessionContextResponse Message

Contains the return status for the setSessionContext message.

<message name="setSessionContextResponse">
  <part name="return"             type="typens:Status"/>
</message>

proxyLoginRequest Message

Logs in the end user to Oracle SES using proxy authentication. It consists of following parameters:

  • username: User name of the proxy user

  • password: Password of the proxy user

  • searchUser: User name of the end user

<message name="proxyLoginRequest">
  <part name="username"            type="xsd:string"/>
  <part name="password"            type="xsd:string"/>
  <part name="searchUser"          type="xsd:string"/>
</message>

The proxy user must be a federation trusted entity created on the Oracle SES instance.

proxyLoginResponse Message

This message contains the return status for the proxyLoginRequest message.

<message name="proxyLoginResponse">
  <part name="return"         type="typens:Status"/>
</message>

Note:

To use the identity propagation from Oracle Fusion Applications, the operations of the package oracle.search.query.webservice.wssclient should be used. In that case, the following authentication operations are not available:
loginRequest
loginResponse
logoutRequest
logoutResponse
proxyLoginRequest
proxyLoginResponse

Search Operations

This section describes the following search operations:

doOracleAdvancedSearch Message

Invokes Oracle SES advanced search and returns search results. It consists of the following parameters:

  • query: The search string. This should follow Oracle SES query syntax. See "Query Web Services Query Syntax" for details.

  • startIndex: Index of the first document in the hitlist to be returned. The default is 1 if not set explicitly.

  • docsRequested: The maximum number of documents in the hitlist to be returned. The default is 10 if not set explicitly.

  • dupRemoved: Boolean flag to enable or disable duplicate removal. If turned on, then duplicate documents in the hitlist are 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 is 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. This 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 that the documents in the hitlist must satisfy all the filters, and "or" indicates that the documents in the hitlist must satisfy at least one filter. 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 nondefault attributes to be fetched with the search result

  • searchControls: XML string to specify advanced filter conditions and ranking parameters

    Note:

    The attribute filter LastModifiedDate uses the format mm/dd/yyyy.
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

doOracleFetchSearch Message

Invokes Oracle SES fetch search and returns fetch results. It consists of the following parameters:

  • query: The search string. This should follow Oracle SES query syntax. See "Query Web Services Query Syntax" for details.

  • targetDocIdList: Target document ID list, most likely from a cluster node.

  • startIndex: Index of the first document in the hitlist to be returned. The default is 1 if not set explicitly.

  • docsRequested: Maximum number of documents in the hitlist 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. This is used in relevancy boosting.

  • fetchAttributeNames: Array of names of custom or nondefault attributes to be fetched with the search result.

  • groupAttr: Attribute used for grouping.

  • sortAttrList: List of sorting attribute settings.

  • clusterList: List of cluster configurations.

public OracleResultContainer doOracleFetchSearch(
        String query,
        String[] targetDocIdList,
        Integer startIndex,
        Integer docsRequested,
        String queryLang,
        String[] fetchAttributeNames,
        GroupAttribute groupAttr,
        SortAttribute[] sortAttrList,
        ClusterConfig[] clusterList)
     throws Exception

doOracleOrganizedSearch Message

This invokes Oracle SES organized search and returns search results. It consists of the following parameters:

query: The search string. This should follow Oracle SES query syntax. See "Query Web Services Query Syntax" for details.

topN: Top N search result for grouping, sorting, and clustering.

startIndex: Index of the first document in the hitlist to be returned. The default is 1 if not set explicitly.

docsRequested: Maximum number of documents in the hitlist 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 hitlist are 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. The dupMarked switch has no effect when dupRemoved is turned on.

groups: Data source groups that the search is 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. This 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 that the documents in the hitlist must satisfy all filters, "or" indicates that the documents in the hitlist must satisfy at least one filter. 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.

fetchAttributeNames: Array of names of custom or nondefault 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 settings.

clusterList: List of cluster configurations.

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

doOracleSearch Message

This is the main message for the search application. It consists of the following parameters:

  • query: A search string. It must be a valid string and it cannot be null. The search string should follow Oracle SES query syntax. See "Query Web Services Query Syntax" for details.

  • startIndex: The index of the first result to be returned. For example, if there are 67 results, you might want to start at 20. The default is 1 if not set explicitly.

  • docsRequested: The maximum number of results to be returned. The default is 10 if not set explicitly.

  • dupRemoved: Enable or disable duplicate removal. If turned on, then the search result eliminate all near duplicate documents from the result list. The dupMarked switch has no effect when dupRemoved is turned on. The default is false if not set explicitly.

  • dupMarked: Enable or disable duplicate detection. If dupRemoved is turned off and dupMarked is turned on, then the search result keeps all near duplicate documents from the result list and marks them as duplicates. If dupRemoved is turned on, then the dupMarked switch has no effect. The default is false if not set explicitly.

  • groups: Limit the search result to the documents from specified source groups. The default is for all groups if not set explicitly.

  • queryLang: The query language argument should be a valid ISO language code. These codes are the lower-case, two-letter codes as defined by ISO-639. Examples: "en" for English and "de" for German. The default is English ("en") if not set explicitly. This is used for relevancy boosting.

  • docLang: Set the language of the documents to limit the search. If the value is not set explicitly, then search is performed against documents of all the languages.

  • returnCount: Set to true to return total hit count with the result. The default is false if not set explicitly.

  • filterConnector: The connector between all filters: "and" indicates the search result must satisfy all filters, "or" indicates the search result must satisfy at least one filter. The default is "and" if not set explicitly.

  • filters: An array of filters. Each filter is a restriction on search results. Filters are connected by filterConnector. The default is null (no filter applies to the search result) if not set explicitly.

  • fetchAttributes: Array of integers representing the nondefault attribute IDs to be fetched in the resultElements. The default is null (or set one int value '0'), so no attributes other than default-attributes are fetched in the resultElements.

<message name="doOracleSearch">
   <part name="query"            type="xsd:string"/>
   <part name="startIndex"       type="xsd:int"/>
   <part name="docsRequested"    type="xsd:int"/>
   <part name="dupRemoved"       type="xsd:boolean"/>
   <part name="dupMarked"        type="xsd:boolean"/>
   <part name="groups"           type="typens:DataGroupArray"/>
   <part name="queryLang"        type="xsd:string"/>
   <part name="docLang"          type="xsd:string"/>
   <part name="returnCount"      type="xsd:boolean"/>
   <part name="filterConnector"  type="xsd:string"/>
   <part name="filters"          type="typens:FilterArray"/>
   <part name="fetchAttributes"  type="typens:IntArray"/>
</message>

doOracleSearchResponse Message

This message returns the search result in OracleSearchResult data type.

<message name="doOracleSearchResponse">
    <part name="return"  type="typens:OracleSearchResult"/>
</message>

doOracleBrowseSearch Message

This message restricts a search to a particular node. It consists of the following parameters:

  • query: A search string. It must be a valid string, and it cannot be null. The search string should follow Oracle SES query syntax. See "Query Web Services Query Syntax" for more details.

  • nodeID: The ID of the node to restrict the search to.

  • fedID: The ID of the federated instance the parent node belongs to (null for local node).

  • startIndex: The index of the first result to be returned. For example, if there are 67 results, then you might want to start at 20. The default is 1 if not set explicitly.

  • docsRequested: The maximum number of results to be returned. The default is 10 if not set explicitly.

  • dupRemoved: Enable or disable duplicate removal. If turned on, then the search result eliminate all near duplicate documents from the result list, and the dupMarked switch have no effect when dupRemoved is turned on. The default is false if not set explicitly.

  • dupMarked: Enable or disable duplicate detection. If dupRemoved is turned off and dupMarked is turned on, then the search result keeps all near duplicate documents from the result list and marks them as duplicates. If dupRemoved is turned on, then the dupMarked switch has no effect. The default is false if not set explicitly.

  • queryLang: The query language argument should be a valid ISO language code. These codes are the lower-case, two-letter codes as defined by ISO-639. Examples: "en" for English and "de" for German. The default is English ("en") if not set explicitly. This is used for relevancy boosting.

  • docLang: Set the language of the documents to limit the search. If the value is not set explicitly, then search is performed against documents of all the languages.

  • returnCount: Set to true to return total hit count with the result. The default is false if not set explicitly.

  • fetchAttributes: Array of integers representing the nondefault attribute IDs to be fetched in the resultElements. The default is null (or set one int value '0'), so no attributes other than default-attributes are fetched in the resultElements.

<message name="doOracleBrowseSearch">
    <part name="query"              type="xsd:string"/>
    <part name="nodeID"             type="xsd:string"/>
    <part name="fedID"              type="xsd:string"/>
    <part name="startIndex"         type="xsd:int"/>
    <part name="docsRequested"      type="xsd:int"/>
    <part name="dupRemoved"         type="xsd:boolean"/>
    <part name="dupMarked"          type="xsd:boolean"/>
    <part name="queryLang"          type="xsd:string"/>
    <part name="docLang"            type="xsd:string"/>
    <part name="returnCount"        type="xsd:boolean"/>
    <part name="fetchAttributes"    type="typens:IntArray"/>
  </message>

doOracleBrowseSearchResponse Message

Returns the search result in OracleSearchResult data type.

<message name="doOracleBrowseSearchResponse">
    <part name="return"  type="typens:OracleSearchResult"/>
</message>

doOracleSimpleSearch Message

A simplified form of the doOracleSearch message. In this message you do not need to specify the advanced search parameters that are specified in the doOracleSearch message. It consists of following parameters:

  • query: A search string. It must be a valid string and it cannot be null. The search string should follow Oracle SES query syntax. See "Query Web Services Query Syntax" for details.

  • startIndex: The index of the first result to be returned. For example, if there are 67 results, you might want to start at 20. The default is 1, if not set explicitly.

  • docsRequested: The maximum number of results to be returned. The default is 10, if not set explicitly.

  • dupRemoved: Enable or disable duplicate removal. If turned on, then the search result eliminates all near duplicate documents from the result list. The dupMarked switch has no effect when dupRemoved is turned on. The default is false if not set explicitly.

  • dupMarked: Enable or disable duplicate detection. If dupRemoved is turned off and dupMarked is turned on, then the search result keeps all near duplicate documents from the result list and marks them as duplicates. If dupRemoved is turned on, then the dupMarked switch has no effect. The default is false if not set explicitly.

  • returnCount: Set to true to return total hit count with the result. The default is false if not set explicitly.

<message name="doOracleSimpleSearch">
  <part name="query"              type="xsd:string"/>
  <part name="startIndex"         type="xsd:int"/>
  <part name="docsRequested"      type="xsd:int"/>
  <part name="dupRemoved"         type="xsd:boolean"/>
  <part name="dupMarked"          type="xsd:boolean"/>
  <part name="returnCount"        type="xsd:boolean"/>
</message>

doOracleSimpleSearchResponse Message

Returns the search result in OracleSearchResult data type.

<message name="doOracleSimpleSearchResponse">
  <part name="return"         type="typens:OracleSearchResult"/>
</message>

getSuggestedContent Message

Returns the suggested content for the given query. It consists of the following parameters:

  • query: Query string

  • returnType: Format in which the content is to be returned, either html or xml. If no style sheet is configured for a given provider, then the return type is the return type of the content returned by the provider, regardless of whether html or xml is specified.

<message name="getSuggestedContent">
  <part name="query"                  type="xsd:string"/>
  <part name="returnType"             type="xsd:string"/>
</message>

getSuggestedContentResponse Message

Returns the suggested content for the query.

<message name="getSuggestedContentResponse">
  <part name="return"                 type="typens:SCElementArray"/>
</message>

Browse Operations

This section describes the following browse operations:

getInfoSourceNodesRequest Message

Obtains the list of info source nodes given the parent node ID. It consists of the following parameters:

  • parentNodeID: The node ID for which all children nodes are returned. If it is not set, then the message returns all the root nodes.

  • fedID: The ID of the federated instance the parent node belongs to (null for local node).

  • locale: A two letter representation of locale. The default is English ("en") if not set explicitly.

<message name="getInfoSourceNodesRequest">     
    <part name="parentNodeID"      type="xsd:string"/>
    <part name="fedID"             type="xsd:string"/>
    <part name="locale"            type="xsd:string"/>
</message>

getInfoSourceNodesResponse Message

Returns an array of info source nodes.

<message name="getInfoSourceNodesResponse">
    <part name="nodes"    type="typens:NodeArray"/>
</message>

getInfoSourceAncestorNodesRequest Message

Obtains the full path of a node, from root to node, given an info source node. It consists of the following parameters:

  • nodeID: The node ID for which all the nodes in the path from root to node are returned; nodeID must be set and it cannot be null.

  • locale: A two letter representation of locale. The default is English ("en") if not set explicitly.

<message name="getInfoSourceAncestorNodesRequest">     
    <part name="nodeID"        type="xsd:string"/>     
    <part name="locale"        type="xsd:string"/>   
</message>  

Note:

The getInfoSourceAncestorNode messages have been deprecated in Oracle SES.

getInfoSourceAncestorNodesResponse Message

Returns an array of info source ancestor nodes.

<message name="getInfoSourceAncestorNodesResponse">     
    <part name="nodes"    type="typens:NodeArray"/>   
</message>

getInfoSourceNodeRequest Message

Retrieves a particular node. It consists of the following parameters:

  • nodeID: The node ID of the node to get, nodeID must be set and it cannot be null.

  • fedID: The ID of the federated instance the parent node belongs to (null for local node).

  • locale: A two letter representation of Locale, the default is English ("en") if not set explicitly.

Message format:

<message name="getInfoSourceNodeRequest">
   <part name="nodeID        "type="xsd:string"/>
   <part name="fedID"        "type="xsd:string"/>
   <part name="locale        "type="xsd:string"/>
</message>

getInfoSourceNodeResponse Message

This message returns the node requested.

<message name="getInfoSourceNodeResponse">    
    <part name="node    "type="typens:Node"/>  
</message>

Metadata Operations

This section describes the following metadata operations:

getLanguageRequest Message

Obtains all the languages supported by Oracle SES. It is used by the client application to display the list of languages. It consists of the following parameter:

locale: A two letter representation of locale. The default is English (en) if not set explicitly.

<message name="getLanguagesRequest">     
    <part name="locale"        type="xsd:string"/>   
</message>

getLanguageResponse Message

This message returns all supported languages.

<message name="getLanguagesResponse">     
    <part name="return"        type="typens:LanguageArray"/>   
</message>

getDataGroupsRequest Message

Requests for all source groups defined in Oracle SES. It is used by the client application to show all source groups in the search page, such that the end user can restrict their search results within one or multiple source groups. It consists of the following parameter:

locale: A two letter representation of locale. The default is English (en) if not set explicitly.

<message name="getDataGroupsRequest">
    <part name="locale"        type="xsd:string"/>             
</message>

getDataGroupsResponse Message

Returns all source groups defined in Oracle SES.

<message name="getDataGroupsResponse">     
    <part name="groups"        type="typens:DataGroupArray"/>              
</message>

getAttributesRequest Message

Obtains a list of search attributes that applied to the given source groups. It consists of the following parameters:

  • locale: A two letter representation of locale. The default is English (en) if not set explicitly.

  • groups: Limit the request to the attributes from specified source groups. The default is all groups if not set explicitly.

  • groupConnector: The connector between all groups: "and" indicates the response is the attributes available in the set of source groups by finding the intersection of each group's attributes, "or" indicates the response is the attributes available in the set of source groups by finding the union of each group's attributes. The default is "or" if not set explicitly.

<message name="getAttributesRequest">   
    <part name="locale"          type="xsd:string"/>          
    <part name="groups"          type="typens:DataGroupArray"/>
    <part name="groupConnector"  type="xsd:string"/>   
</message>

getAttributesResponse Message

Returns an array of search attributes.

<message name="getAttributesResponse">     
    <part name="return"       type="typens:AttributeArray"/>   
</message>

getAllAttributesRequest Message

Obtains all search attributes defined in Oracle SES. It consists of the following parameter:

locale: A two letter representation of locale. The default is English (en) if not set explicitly.

<message name="getAllAttributesRequest">
  <part name="locale" type="xsd:string"/>
</message>

getAllAttributesResponse Message

Returns all search attributes defined in Oracle SES.

<message name="getAllAttributesResponse">     
    <part name="return"       type="typens:AttributeArray"/>   
</message>

getAttributeLOVRequest Message

Obtains the LOV items given a search attribute. It consists of the following parameters:

  • attribute: A search attribute for the LOV (list of values) requested.

  • locale: A two letter representation of locale. The default is English ("en") if not set explicitly.

<message name="getAttributeLOVRequest">
  <part name="attribute"     type="typens:Attribute"/>        
  <part name="locale"        type="xsd:string"/>   
</message>

getAttributeLOVResponse Message

Returns an array of search attribute LOV elements.

<message name="getAttributeLOVResponse">     
  <part name="return"    type="typens:AttributeLOVElementArray"/>   
</message>

Search Hit Operations

This section describes the following search hit operations:

getCachedPageRequest Message

Obtains the cached version of a document given the document ID and the search string. The search string is highlighted in the output. It consists of the following parameters:

  • query: The search string.

  • docID: The document ID to be fetched.

  • fedID: The federated instance ID, used to track which federated instance the document is fetched from.

<message name="getCachedPageRequest">
    <part name="query"          type="xsd:string"/>
    <part name="docID"          type="xsd:int"/>
    <part name="fedID"          type="xsd:string"/>
</message>

getCachedPageResponse Message

Returns the byte array of the cached HTML page.

<message name="getCachedPageResponse">
    <part name="return"         type="xsd:base64Binary"/>
</message>

getInLinksRequest Message

Obtains all the incoming links for a given search hit (document). It consists of the following parameters:

  • docID: The document ID for the incoming links to be fetched. It must be a valid document ID and it cannot be null.

  • maxNum: The maximum number of incoming links requested. The default is 25 if not set explicitly.

  • fedID: The federated instance ID, used to track which federated instance the document is fetched from.

<message name="getInLinksRequest">     
    <part name="docID"                 type="xsd:int"/>   
    <part name="maxNum"                type="xsd:int"/>   
    <part name="fedID"                 type="xsd:string"/>
</message>

getInLinksResponse Message

Returns an array of incoming link URL strings.

<message name="getInLinksResponse">     
    <part name="return"      type="typens:StringArray"/>     
</message>  

getOutLinksRequest Message

Obtains all the outgoing links for a given search hit (document). It consists of the following parameters:

  • docID: The document ID for the outgoing links to be fetched. It must be a valid document ID and it cannot be null.

  • maxNum: The maximum number of outgoing links requested. The default is 25 if not set explicitly.

  • fedID: The federated instance ID, used to track which federated instance the document is fetched from.

<message name="getOutLinksRequest">     
    <part name="docID"                type="xsd:int"/>   
    <part name="maxNum"               type="xsd:int"/>   
    <part name="fedID"                type="xsd:string"/>
</message>

getOutLinksResponse Message

This message returns an array of outgoing link URL strings.

<message name="getOutLinksResponse">     
    <part name="return"      type="typens:StringArray"/>     
</message>

logUserClickRequest Message

This message logs the user's click. It consists of the following parameters:

  • queryID: ID of the submitted search.

  • urlID: ID of the document that the user clicked.

  • infosourceID: Infosource ID. If none, then –1 is used as the default value

  • position: The position of the document in the result list. For example, the first hit on the page or ninth hit on the page.

  • fedID: Federation ID. Specifies the federated instance on which the document resides.

<message name="logUserClickRequest">
    <part name="queryID"        type="xsd:int"/>
    <part name="urlID"          type="xsd:int"/>
    <part name="infoSourceID"   type="xsd:int"/>
    <part name="position"       type="xsd:int"/>
    <part name="fedID"          type="xsd:string"/>
</message>

logUserClickResponse Message

Returns the URL of the clicked document.

<message name="logUserClickResponse">
  <part name="url"              type="xsd:string"/>
</message>

User Feedback Operations

This section describes the following user feedback operations:

submitUrlRequest Message

Submits a URL to Oracle SES so that it crawls and indexes the URL. This operation consists of the following parameter:

  • url: The URL to be submitted to the crawler so it can be crawled next time. It must be a valid URL and it cannot be null.

<message name="submitUrlRequest">     
     <part name="url"        type="xsd:string"/>   
</message>  

submitUrlResponse Message

Returns the status, which consists of two strings. The first is the submission status, which is either successful or failed. The second string is the error message when the submission status is failed.

<message name="submitUrlResponse">     
     <part name="return"      type="typens:Status"/>
</message>

Query Web Services Query Syntax

This section describes the query syntax used in the Oracle Secure Enterprise Search Search API.

Search Term

A search term can be a single word, a phrase, or a special search term. For example, if the search string is oracle secure enterprise search, then there are four search terms in the search string: oracle, secure, enterprise, and search. If the search string is oracle "secure enterprise search", then there are two search terms in the search string: oracle and "secure enterprise search".

Search terms are case insensitive so that different cases are treated the same. For example, searching oracle, Oracle, or ORACLE returns the same search result.

Phrase

A phrase is a string enclosed in double-quotes ("). It can contain one or multiple words.

Operators

The following operators are defined in the query syntax:

  • Plus [+]: The plus operator specifies that the search term immediately following it must be found in all matching documents. For example, searching for [Oracle +Applications] only finds documents that contain the word "Oracle" and "Applications". In a multiple word search, you can attach a [+] in front of every token including the very first token. You can also attach a [+] in front of a phrase enclosed in double-quotes ("). But there should be no space between the [+] and the search term.

  • Minus [-]: The minus operator specifies that the search term immediately following it cannot appear in any document included in the search result. For example, searching for [Oracle -Applications] only finds documents that do not contain the word "Applications". In a multiple word search, you can attach a [-] in front of every token except the very first token. It can be a single word or a phrase, but there should be no space between the [-] and the token.

  • Asterisk [*]: The asterisk specifies a wildcard search. For example, searching for the string [Ora*] finds documents that contain all words beginning with "Ora" such as "Oracle" and "Orator". You can also insert an asterisk in the middle of a word. For example, searching for the string [A*e] finds documents that contain words such as "Apple" or "Ape". Wildcards are not enabled by default; you can turn them on by modifying the queryConfig object in the Administration API. See the Oracle Secure Enterprise Search Administration API Guide.

Default Search: Implicit AND

By default, Oracle SES searches all of your search terms and relevant variations of the terms you entered. You do not need to include any operators (like AND) between terms. The order of the terms in the search affects the search results.

Word Separator

Use one or more spaces to separate each of the search terms.

Filter Conditions (Advanced Conditions)

Oracle SES query syntax only supports 'Site' and 'File type' filter conditions. It does not support any other filter conditions (advanced conditions) such as title, author, or last modified date. To restrict your search with other filter conditions, you can specify them in the Web Services API message doOracleSearch.

Special Search Terms

Oracle SES supports the use of several special search terms that allow the user or search administrator to access additional capabilities of the Oracle SES. Following is the list of special search terms:

Exclude Search Term

You can exclude a word from your search by putting a minus sign [-] immediately in front of the term you want to exclude from the search results. Exclusion does not work with stop words.

Example: oracle -search

Negative search is not allowed unless there is another positive search term. For example:

-search is an invalid search.

oracle -search is a valid search.

Wildcard Search

You can use an asterisk to match any number of characters in the middle or the end of a search term. You cannot place it at the beginning, such as searching for *earch.

Example: Ora*

Phrase Search

Search for complete phrases by enclosing them in quotation marks. Words marked in this way appear together in all results exactly as entered.

Example: "oracle secure enterprise search"

Site Restricted Search

If you know the specific Web site you want to search, but are not sure where the information is located within that site, then search only within the specific Web site. Enter the search followed by the string site: followed by the host name.

Example: oracle site:example.com

Notes:

  • Domain restriction is not supported, because Oracle SES does not support left-truncated wildcard search (such as *.example.com)

  • The exclusion operator (-) can be applied to this search term to remove a Web site from consideration in the search.

  • Site restricted search term is implicit AND with other search terms.

  • Only one site restriction is allowed. Also, you cannot have both site inclusion and exclusion in the search string. For example, the following search string is invalid:

    oracle search  site:www.oracle.com  -site:otn.oracle.com
    

File Type Restricted Search

The search prefix filetype: filters the results returned to include only documents with the extension specified immediately after. There can be no space between filetype: and the specified extension.

Example: oracle filetype:doc

Notes:

  • The exclusion operator (-) can be applied to this search term to remove a file type from consideration in the search.

  • Only one file type can be included. The following extensions are supported: doc, htm, html, xml, ps, pdf, txt, rtf, ppt, and xls. doc, html, pdf, txt, rtf, ppt, xls.

  • File type restricted search term is implicit AND with other search terms.

  • Only one file type restriction is allowed. Also, you cannot have both file type inclusion and exclusion in the search string. For example, the following search string is invalid:

    oracle search  filetype:doc -filetype:pdf
    

Query Web Services Example: Basic Search

Following is a simple JSP application using Oracle Secure Enterprise Search proxy Java library to provide the basic search functionality:

<%@page contentType="text/html; charset=utf-8" %>
<%@page import = "java.util.Vector" %>
<%@page import = "java.net.URL" %>
<%@page import = "java.util.Properties" %>
<%@page import = "java.util.HashMap" %>
import javax.xml.rpc.Stub;
<%@page import = "oracle.search.query.webservice.client.*" %>
 
<%
  //
  // Get the search term entered by the user
  //
  String searchTerm = request.getParameter("searchTerm");
  if (searchTerm == null)  searchTerm = "";
 
  //
  // Define the result element array.
  //
  // ResultElement is a proxy Java class
  ResultElement[] resElemArray = null; 
  int estimatedHitCount = 0;
 
  if (searchTerm != null && !"".equals(searchTerm))
  {
    //
    // Create the Oracle SES Web Services client stub
    //
    OracleSearchService stub = new OracleSearchService();
 
    //
    // Set the Oracle SES Web Services URL.
    // The URL is http://<host>:<port>/search/query/OracleSearch  
    //
    stub.setSoapURL("http://staca19:7777/search/query/OracleSearch");
 
    //
    // Get the search result by calling OracleSearchService.doOracleSearch()
    //
    OracleSearchResult result = stub.doOracleSearch(searchTerm,
                            new Integer(1),
                            new Integer(10),
                            Boolean.TRUE,
                            Boolean.TRUE,
                            null,
                            "en",
                            "en",
                            Boolean.TRUE,
                            null,
                            null,
                            null);
    //
    // Get the estimated hit count by calling 
    estimatedHitCount = result.getEstimatedHitCount().intValue();
 
    // Get the search results
    resElemArray = result.getResultElements();
  }
%>
 
<HTML>
<HEAD>
    <TITLE>Oracle SES Web Services Demo </TITLE>
</HEAD>
<BODY>
<FORM name="searchBox" method="post" action="./DemoWS.jsp">
 <INPUT id="inputMain" type="text" size="40" name="searchTerm" value="<%=searchTerm%>">
 <INPUT type="hidden"  name="searchTerm" value="<%= searchTerm %>">
 <INPUT type="submit" name="action" value="Search">
</FORM>
<BR><BR><BR>
 
<%
  //
  // Render the search results
  //
  if (resElemArray == null || resElemArray.length == 0)
  {
%>
  <H3> There are no matches for the search term </H3>
<%
  }
  else
  {
%>
  <H3> There are about <%=estimatedHitCount%> matches </H3>
<%
    for (int i=0; i<resElemArray.length; i++)
    {
      String title = resElemArray[i].getTitle();
      if (title == null) title = "Untitled Document";
%>
  <P>  
    <B><A HREF="<%=resElemArray[i].getUrl()%>"><%=title%></A> </B>
    <BR>
     <%=resElemArray[i].getSnippet()%>
    <BR>
  </P>
<%
    }
  }
%>
</BODY>
</HTML>

Default-Factor Element

The default-factor element assigns a weight to an attribute.

<default-factor>
   <name>title</name>
   <weight>VERY HIGH</weight>
</default-factor>

Default factor attribute names are case-insensitive.

When a default-factor does not appear in the ranking XML string, Oracle SES takes the default weight for this ranking factor, unless default factors are disabled by enable-all-default-factor.

Oracle SES supports the following values for weight element: empty (Oracle SES uses the default weight), none (this attributes is not used in the ranking query), very high, high, medium, low, and very low.

Table 11-3 lists the default-factor names and weights:

Table 11-3 Oracle SES Default Attributes and Weights

Attribute Weight

Title

High

Description

Medium

Reftext

High

Keywords

Medium

Subject

Low

Author

Medium

H1headline

Low

H2headline

Very low

Url

Low

Urldepth

High

Language Match

High

Linkscore

High


Query Web Services Example: Customizing Relevancy

The following is the signature of the method for advanced search:

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

The searchControls parameter accepts a XML string, which include the filter and ranking elements.

<searchControls>
     <filter>  ... </filter>
     <ranking> ... </ranking>
</searchControls>

Filter Element

Filters for attribute search are passed in the filter element. All the various AND and OR conditions on the attributes are specified in the XML. For example:

<filter>
   <operator type="and">
   <operator type="or">
      <attributefilter name="xxx" type="string" operation="equals" value="ttt"/>
      <attributefilter name="yyy" type="number" 
         operation="greaterthan" value="22"/>
...
   </operator>
...
      <attributefiler name="aaa" type="number" operation="equals" value="22"/>
...
   </operator>
</filter

If the parameter searchControls is null, then filters and filterConnector are used to create advanced search; otherwise, they are ignored.

Ranking Element

The ranking XML string is expressed as ranking element in searchControls. The following is an example of ranking element:

<ranking>
   <global-settings>
      <enable-all-default-factor>TRUE</enable-all-default-factor>
   </global-settings>
   <default-factor>
      <!--default ranking factor -- >
      ...
   </default-factor>
   <default-factor>
      <!--default ranking factor -- >
      ...
   </default-factor>
   <custom-factor>
      <!--default ranking factor -- >
      ...
   </custom-factor>
   <custom-factor>
      <!--default ranking factor -- >
      ...
   </custom-factor>
</ranking>

The following rules apply to the construction of ranking XML string:

  • The whole ranking XML can be null, in which case default ranking is used.

  • The ranking XML contains the elements default-factor and custom-factor. Both can be null or absent at the same time.

  • When default-factor is null or absent and when custom-factor is not null, default ranking is used with the effect of custom-factor.

  • When custom-factor is null or absent, it does not have any impact on the ranking.

  • The ranking scheme applies only for the function doOracleAdvancedSearch call with none-empty query parameter passed.

Global-Settings Element

The global-settings element contains parameter settings across ranking factors. The ranking element has an attribute called enable-all-default-factor, which accepts two values: true or false. (When this attribute is absent, true is taken as the default value.)

When enable-all-default-factor is true, all default attributes are included in ranking queries, unless some default attributes are explicitly excluded in default-factor elements.

When enable-all-default-factor is false, all default attributes are excluded in ranking queries, unless some default attributes are explicitly included in default-factor elements.

Custom-Factor Element

The custom-factor element lets you add more attributes for ranking. Any indexed search attribute can be a custom ranking attribute.

Note:

Adding custom attributes for relevancy ranking can downgrade search performance.

The custom-factor element has four elements: attribute-name, attribute-type, factor-type, and weight (or match depending on the factor-type).

<custom-factor>
     <attribute-name>author manager</attribute-name>
     <attribute-type>STRING</attribute-type>
     <factor-type>QUERY_FACTOR</factor-type>
     <weight>LOW</weight> 
</custom-factor>

or

<custom-factor>
     <attribute-name>document quality</attribute-name>
     <attribute-type>STRING</attribute-type>
     <factor-type>STATIC_FACTOR<factor-type>
     <match>
        <value>good</value>
        <weight>HIGH</weight> 
     </match>
     <match>
        <value>fair</value>
        <weight>MEDIUM</weight> 
     </match>
     <match>
        <value>bad</value>
        <weight>VERY LOW</weight> 
     </match>
</custom-factor>
  • The attribute-name values are literally matched against attribute name in Oracle SES. Any indexed search attribute name can be attribute-name value. The value of the attribute-name element is case-insensitive.

  • The attribute-type element defines the type of the attribute. Only String attribute type is supported. Attribute-name and attribute-type in combination define a valid Oracle SES attribute.

  • For factor-type, Oracle SES supports two types of ranking for custom ranking attributes.

    • QUERY_FACTOR: The attribute value is matched against query terms. A positive match boosts the document based on specified weight. QUERY_FACTOR is a query-based ranking factor; for example, title and reftext. The weight element should appear for this custom ranking factor. For example, with the query "Roger Federer", if a document has a custom attribute publisher with the value "Roger Federer", then it could be relevant.

    • STATIC_FACTOR: Attribute value is matched against fixed values specified in the custom ranking factor. (The match element should appear for this custom ranking factor.) STATIC_FACTOR is not a query-based ranking factor. The fixed values specify qualities of the documents, such as the link score and the sources of documents. For example, assume that documents have been classified based on quality. Well-written documents are classified as good, and poorly-written documents are classified as bad. A good document should be ranked higher than a bad document, even though they are both matched against a query. You can specify in the API that a document having a good quality should be boosted in relevancy by a specified weight.

  • The match element specifies the match values and corresponding match weights when the factor-type is STATIC_FACTOR. The following XML string is a example of match element:

    <match>
       <value>bad</value>
       <weight>VERY LOW</weight> 
    </match>
    
  • The value element is used to match the corresponding attribute value of this ranking factor. Only alphanumeric letters are allowed in the attribute value. The match is case-insensitive.

  • The weight element has the identical syntax with weight element for default ranking element.

Applying Ranking Factors

The XML ranking text can be applied in two places:

  • As a part of the searchControls element, the ranking factors can be used as an advanced control for each query execution through the Web services method. This is called per-query ranking control.

  • The ranking factors specified in the relevanceRanking object of the Administration API are applied to all queries. This is called instance-wide ranking control.

In federated search, instance-wide ranking controls only applies to one instance. You must configure each instance for ranking customization separately.

If a conflict arises, the per-query ranking control specified in Web services method overrides the settings specified in instance-wide ranking control. That can include the following cases:

  • Per-query and instance-wide ranking specify the same factor, the factor set by per-query is taken by Oracle SES.

  • Instance-wide ranking control sets a ranking factor, but per-query ranking control does not mention. Oracle SES takes the factor set by instance-wide ranking control.

  • Per-query ranking control sets a ranking factor, which instance-wide ranking controls does not mention. Oracle SES takes the factor set by per-query ranking control.

  • If instance-wide ranking control sets enable-all-default-factor as false and per-query ranking control sets enable-all-default-factor as true, then Oracle SES takes the default attributes set explicitly by instance-wide ranking control plus the attributes set by per-query ranking controls, with the latter overriding the former.

Client-Side Query Java Proxy Library

Oracle SES also provides client-side Java proxies for marshalling and parsing Web Services SOAP messages. Client applications can use the library to access Oracle SES Web Services.

The proxy library includes the following Java classes, which are mapped to the corresponding Web Services data types and messages:

  • oracle.search.query.webservice.client.Attribute

  • oracle.search.query.webservice.client.AttributeLOVElement

  • oracle.search.query.webservice.client.ClusterAttribute

  • oracle.search.query.webservice.client.ClusterConfig

  • oracle.search.query.webservice.client.ClusterTree

  • oracle.search.query.webservice.client.CustomAttribute

  • oracle.search.query.webservice.client.DataGroup

  • oracle.search.query.webservice.client.Filter

  • oracle.search.query.webservice.client.GroupAttribute

  • oracle.search.query.webservice.client.GroupingResult

  • oracle.search.query.webservice.client.Language

  • oracle.search.query.webservice.client.Node

  • oracle.search.query.webservice.client.OracleSearchResult

  • oracle.search.query.webservice.client.OracleSearchService

  • oracle.search.query.webservice.client.ResultElement

  • oracle.search.query.webservice.client.SCElement

  • oracle.search.query.webservice.client.SessionContextElement

  • oracle.search.query.webservice.client.SortAttribute

  • oracle.search.query.webservice.client.Status

  • oracle.search.query.webservice.client.SuggestedLink

To compile and run your client application using the Oracle SES client-side Java proxy library, unzip the file MW_HOME/wlserver_10.3.4/server/lib/wseeclient.zip, and include all the jar files present in this zip file in the Java CLASSPATH.

Also include the following jar files in the Java CLASSPATH:

  • MW_HOME/wlserver_10.3.4/server/lib/weblogic.jar

  • MW_HOME/modules/org.apache.ant_1.7.1/lib/ant.jar

  • MW_HOME/oracle_common/modules/oracle.webservices_11.1.1/ oracle.webservices.standalone.client.jar

  • ORACLE_HOME/search/lib/search_client.jar

  • ORACLE_HOME/search/lib/plugins/cservices/jaxrpc.jar