Implementing a Custom Search Interface with SES - a case study with search.oracle.com. An Oracle White Paper June 2006



Similar documents
Manage Oracle Database Users and Roles Centrally in Active Directory or Sun Directory. Overview August 2008

Oracle BI Publisher Enterprise Cluster Deployment. An Oracle White Paper August 2007

Next Generation Siebel Monitoring: A Real World Customer Experience. An Oracle White Paper June 2010

An Oracle White Paper March Integrating Microsoft SharePoint Server With Oracle Virtual Directory

An Oracle White Paper September Oracle WebLogic Server 12c on Microsoft Windows Azure

Oracle Business Intelligence Enterprise Edition Plus and Microsoft Office SharePoint Server. An Oracle White Paper October 2008

An Oracle White Paper July Introducing the Oracle Home User in Oracle Database 12c for Microsoft Windows

Monitoring and Diagnosing Production Applications Using Oracle Application Diagnostics for Java. An Oracle White Paper December 2007

Managed Storage Services

Siebel CRM On Demand Single Sign-On. An Oracle White Paper December 2006

An Oracle White Paper October BI Publisher 11g Scheduling & Apache ActiveMQ as JMS Provider

Oracle Primavera Gateway

OpenLDAP Oracle Enterprise Gateway Integration Guide

One View Report Samples Warehouse Management

Oracle VM Manager Template. An Oracle White Paper February 2009

Oracle Easy Connect Naming. An Oracle White Paper October 2007

Maximum Availability Architecture. Oracle Best Practices For High Availability. Backup and Recovery Scenarios for Oracle WebLogic Server: 10.

One View Report Samples Financials

Highmark Unifies Identity Data With Oracle Virtual Directory. An Oracle White Paper January 2009

Integrating Tutor and UPK Content: A Complete User Documentation Solution. An Oracle White Paper April 2008

An Oracle White Paper March Integrating the SharePoint 2007 Adapter with WebCenter Spaces ( & )

Deliver Oracle BI Publisher documents to Microsoft Office SharePoint Server An Oracle White Paper July 2008

An Oracle White Paper February Integration with Oracle Fusion Financials Cloud Service

MANAGING A SMOOTH MARKETING AUTOMATION SOFTWARE IMPLEMENTATION

IIS Reverse Proxy Implementation

Setting up the integration between Oracle Social Engagement & Monitoring Cloud Service and Oracle RightNow Cloud Service

Oracle Net Services for Oracle10g. An Oracle White Paper May 2005

10 Questions to Ask Your On-Demand Contact Center Provider. An Oracle White Paper September 2006

Oracle Database 10g: Building GIS Applications Using the Oracle Spatial Network Data Model. An Oracle Technical White Paper May 2005

An Oracle White Paper July Oracle Desktop Virtualization Simplified Client Access for Oracle Applications

An Oracle White Paper May Distributed Development Using Oracle Secure Global Desktop

Oracle Business Intelligence ADF Custom Visualizations and Integration. An Oracle White Paper November 2012

Express Implementation for Electric Utilities

Achieving Sarbanes-Oxley Compliance with Oracle Identity Management. An Oracle White Paper September 2005

An Oracle White Paper November Oracle Business Intelligence Standard Edition One 11g

An Oracle White Paper September Oracle Database and the Oracle Database Cloud

Oracle Primavera P6 Enterprise Project Portfolio Management Performance and Sizing Guide. An Oracle White Paper October 2010

Long User ID and Password Support In JD Edwards EnterpriseOne

June, 2015 Oracle s Siebel CRM Statement of Direction Client Platform Support

Oracle Enterprise Single Sign-on Technical Guide An Oracle White Paper June 2009

Oracle Application Server 10g Web Services Frequently Asked Questions Oct, 2006

An Oracle White Paper June, Provisioning & Patching Oracle Database using Enterprise Manager 12c.

An Oracle White Paper May Creating Custom PDF Reports with Oracle Application Express and the APEX Listener

Oracle Insurance General Agent Hardware and Software Requirements. Version 8.0

Microsoft Active Directory Oracle Enterprise Gateway Integration Guide

Oracle Hyperion Financial Management Virtualization Whitepaper

The Case for a Stand-alone Rating Engine for Insurance. An Oracle Brief April 2009

An Oracle White Paper October Frequently Asked Questions for Oracle Forms 11g

Ensuring Web Service Quality for Service-Oriented Architectures. An Oracle White Paper June 2008

Oracle Directory Services Integration with Database Enterprise User Security O R A C L E W H I T E P A P E R F E B R U A R Y

An Oracle White Paper June Security and the Oracle Database Cloud Service

An Oracle White Paper March Oracle s Single Server Solution for VDI

An Oracle White Paper July Oracle Primavera Contract Management, Business Intelligence Publisher Edition-Sizing Guide

An Oracle White Paper April How to Install the Oracle Solaris 10 Operating System on x86 Systems

An Oracle White Paper June Integration Technologies for Primavera Solutions

An Oracle White Paper June RESTful Web Services for the Oracle Database Cloud - Multitenant Edition

Oracle Identity Management for SAP in Heterogeneous IT Environments. An Oracle White Paper January 2007

Oracle Identity Management Concepts and Architecture. An Oracle White Paper December 2003

Get More from Microsoft SharePoint with Oracle Fusion Middleware. An Oracle White Paper January 2008

How To Load Data Into An Org Database Cloud Service - Multitenant Edition

An Oracle White Paper September Directory Services Integration with Database Enterprise User Security

An Oracle White Paper December The Value of Diameter Signaling in Security and Interworking Between 3G and LTE Networks

Oracle On Demand Infrastructure: Virtualization with Oracle VM. An Oracle White Paper November 2007

Oracle SQL Developer Migration. An Oracle White Paper September 2008

March Oracle Business Intelligence Discoverer Statement of Direction

Oracle Fusion Applications Splitting Topology from Single to Multiple Host Servers

An Oracle White Paper October Oracle Data Integrator 12c New Features Overview

An Oracle White Paper October Oracle Database and IPv6 Statement of Direction

Virtual Compute Appliance Frequently Asked Questions

An Oracle White Paper Released Sept 2008

Oracle FLEXCUBE Direct Banking Release Corporate E-Factoring User Manual. Part No. E

An Oracle White Paper January Using Oracle's StorageTek Search Accelerator

An Oracle White Paper September Oracle Team Productivity Center

Attestation of Identity Information. An Oracle White Paper May 2006

An Oracle White Paper June, Enterprise Manager 12c Cloud Control Application Performance Management

An Oracle White Paper February Real-time Data Warehousing with ODI-EE Changed Data Capture

Siebel CRM Reports. Easy to develop and deploy. Administration

Lowering E-Discovery Costs Through Enterprise Records and Retention Management. An Oracle White Paper March 2007

How To Customize An Org Bee 11G With A Custom Skin On A Windows 7.5 (Oracle) 11G (Orca) 11Ge (Orora) 11Gh (Orroboro) 11E (Ororro

An Oracle White Paper April, Effective Account Origination with Siebel Financial Services Customer Order Management for Banking

An Oracle Technical White Paper June Oracle VM Windows Paravirtual (PV) Drivers 2.0: New Features

JD Edwards Performance Tuning guide for Oracle Application Server and Oracle Portal Server 10g.

Top Ten Reasons for Deploying Oracle Virtual Networking in Your Data Center

WebSphere MQ Oracle Enterprise Gateway Integration Guide

An Oracle Communications White Paper December Serialized Asset Lifecycle Management and Property Accountability

Oracle Application Development Framework Overview

Maximum Availability Architecture. Oracle Best Practices For High Availability

An Oracle White Paper December Advanced Network Compression

Using Symantec NetBackup with VSS Snapshot to Perform a Backup of SAN LUNs in the Oracle ZFS Storage Appliance

Virtual Contact Center

Business Intelligence and Service Oriented Architectures. An Oracle White Paper May 2007

An Oracle White Paper August Oracle Service Cloud Integration with Oracle Siebel Service

An Oracle Best Practice Guide April Best Practices for Knowledgebase and Search Effectiveness

Oracle JD Edwards EnterpriseOne Mobile Sales Order Entry

Configuring Microsoft Active Directory for Oracle Net Naming. An Oracle White Paper April 2014

An Oracle White Paper January Integrating Oracle Application Express with Oracle Access Manager. Revision 1

Transcription:

Implementing a Custom Search Interface with SES - a case study with search.oracle.com An Oracle White Paper June 2006

Implementing a Custom Search Interface with SES - a case study with search.oracle.com Introduction... 3 Custom search UI... 3 High Level Design... 3 Implementation of custom UI using web services... 5 Web service end point... 5 Package to import... 5 Initialize Search Context... 5 Search... 6 Data groups... 6 Attributes... 6 Filters... 6 Suggested Links... 6 Alternate Keyword... 7 Similar Documents... 8 Search Result... 9 Secure Enterprise search... 9 Packaging for Deployment... 9 Classpath Setting... 9 Deploying the Search Custom UI... 10 SES default namespace... 10 Creating Separate Namespace... 10 Conclusion... 11 Appendix... 12 Freemarker Implementation... 12 Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 2

Implementing a Custom Search Interface with SES - a case study with search.oracle.com INTRODUCTION Oracle Secure Enterprise Search 10g is an out-of-the-box solution that provides search capabilities across multiple repositories - Oracle databases and Portals, websites, email systems, files on disk and many more. This paper provides an outline on using Oracle Secure Enterprise Search s web service APIs for developing a custom UI, based on the experience of its implementation. The goal of this document is to understand how the search user interface implementation using web service APIs of SES works with oracle.com. The UI can be viewed at search.oracle.com. Even though Oracle Secure Enterprise Search provides a default search UI, search.oracle.com needed a custom UI, because OTN has its own look and feel and, in order to make the UI consistent, the search engine has to have a custom UI. For more details about Oracle Secure Enterprise Search and sample code, visit http://www.oracle.com/technology/products/oses/index.html This implementation uses freemarker as the template engine to generate text output for the interface. CUSTOM SEARCH UI The Web Services API is used to build a custom search application to search on the data indexed by Oracle Secure Enterprise Search. Oracle SES provides the Web Services Proxy Java library. HIGH LEVEL DESIGN The custom UI relies on the Java client stubs generated from the SES WSDL. The approach in this implementation is to separate the UI from scriplets by using freemarker as the template technology. This provides a reasonable separation of the application logic from the presentation layer. In this implementation, there are two jsps such as initialize.jsp and search.jsp. initialize.jsp initialize the search context and set the web service end point. The search.jsp, which is the entry point, will process the search query and hold all the dynamic content, which are required for the proper display of UI, in a hashmap. There are three different templates designed for custom search UI such as query.ftl, Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 3

result.ftl and noresult.ftl. query.ftl is the template corresponding to the default search UI. Depending upon the search result for the query submitted in the default search UI, application will load a template, either result.ftl or noresult.ftl, which is actually responsible for the UI look and feel. Result UI, which gets generated from result.ftl, will have the search results. When there is no search result for a keyword submitted, the noresult screen, which is generated by noresult.ftl, will get displayed. Custom Search UI Snapshots - search.oracle.com Query screen Result Screen Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 4

No Result Screen Implementation of custom UI using web services The Web Services API is used to build custom search application to search on the data indexed by Oracle Secure Enterprise Search. In order to get the complete picture of web service API s provided by SES, refer Oracle Secure Enterprise Search Administrator's Guide. Web service end point The default end point for accessing web service APIs for SES is http://hostname:port/search/query/oraclesearch. How to change the default end point is described in the section Deploying the Search Custom UI. Note: After changing the default namespace to /default/search the end point will be http://hostname:port/default/query/oraclesearch. Package to import The following package needs to be imported to implement OSES web service APIs. oracle.search.query.webservice.client.*; Initialize Search Context The search context can be initialized as follows. OracleSearchService ctx = new OracleSearchService(); ctx.setsoapurl( <endpoint> ); e.g. ctx.setsoapurl(http://hostname:port/default/query/orac lesearch); Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 5

Search Search can be performed within group as well as within a node. If none of this specified, search would be performed against all available sources configured in the SES admin UI. If search has to be specified within a group, the group name has to be specified. Similarly for search within a node, the nodeid and federated Id are to be specified. For a local search, the fid is 1 by default. For node search within federated source, the corresponding fid has to be given as input. Data groups SES provides API to get the configured source groups. This information can be used display the available groups in the UI and restrict search within a source group. While using federated search, the source can be added to a group and using this group search can be restricted within the federated source. Attributes SES provides API to get the attributes available for search. This attribute list can be used for advanced search where any passed attribute can be validated against the attributes available. This is useful for narrow down the search by restricting the match against any specific attribute. Filters Filters are used to restrict the search query. While doing a search, multiple filters can be specified. Each filter is a restriction on search results. Filters are connected by filterconnector. No filter applies to the search result if not set explicitly. Filter can be created as follows: Filter filter = new Filter(attributeId, attributetype,searchopname, searchattvalue); AttributeId and attributetype can be obtained by matching the attribute name from the attributelist obtained using API getattributes. For e.g. if the attributeid and type of an attribute LastModifiedDate are 1 and Date, and the operation name and attributevalue are greaterthan and 10/10/2005, the object will be created as Filter filter = new Filter(1, Date, greaterthan, 10/10/2005 ); Suggested Links Suggested Links is a feature which improves the overall search quality. For example, for a keyword oracle, suggested links like http://www.oracle.com and http://partners.oracle.com can be added so that end user will get this also with the result for keyword oracle and this can be shown with high priority on the UI. Suggested links for any search keyword can be added in the OSES admin UI. This Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 6

information can be shown in the custom UI if required. The OracleSearchResult object, which is returned by the search API hold an array of Suggested Link class objects. It has the suggested link title and url as member variables. A screen shot of the Custom UI with Suggested Links can be viewed in below The snapshot below shows the page in admin UI where the suggested links can be added. Alternate Keyword Alternate Keyword is another feature, which improves the overall search quality. Alternate Keywords are used to search commonly used keywords, so that the user can easily specify the exact keyword he was intended to search. For example if there is an alternate keyword mentioned in admin UI for a keyword crm as Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 7

customer relationship management, when the user search for crm, the result page show a link Did you mean customer relationship management, clicking on which will yield the results for customer relationship management. The alternate keyword for any search keyword can be configured in the OSES admin UI. This can be displayed in the UI if required. The OracleSearchResult object, which is returned by the search API has a member variable holding the alternate keywords. A screen shot of the Custom UI with Alternate Keyword can be viewed below. The snapshot below shows the page in admin UI where the Alternate Keywords can be added. Similar Documents All duplicate and near duplicate documents comes in the search result are referred by the term similar documents. If in the search result, duplicate documents need not come, then the search query should be made in such a way that dupremoved flag should be set to true. If the similar documents are to be there in the search result, dupremoved flag should be set to false and dupmarked flag should be set to true. If the requirement is that the similar documents should get displayed only by Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 8

clicking a link say Similar Documents, code should be capable of hiding the duplicate documents initially, based on the isduplicate flag value, and display it on clicking the link, by passing the document id. Search Result The search results are returned as an object of OracleSearchResult. The OracleSearchResult object has an array of ResultElement objects. Any of its member variable values can be displayed as per the business requirement. Secure Enterprise search Secure enterprise can be implemented using the authentication APIs. In order to use the authentication APIs, the custom UI has to keep the end user's requests in the same context ctx = (OracleSearchService) request.getsession().getattribute("searchcontext"); if (ctx == null) { } ctx = new OracleSearchService(); ctx.setsoapurl( endpoint ); request.getsession().setattribute("searchcontext ",ctx); Packaging for Deployment Classpath Setting To compile and run client application using Oracle SES client-side Java proxy libraries, one need to include the following files in the Java CLASSPATH. These files can be obtained from Oracle SES server file directory. $ORACLE_HOME/search/lib/search_query.jar (The proxy Java libraries) $ORACLE_HOME/oc4j/soap/lib/soap.jar $ORACLE_HOME/oc4j/j2ee/home/lib/http_client.jar $ORACLE_HOME/xdk/lib/xmlparserv2.jar $ORACLE_HOME/lib/mail.jar $ORACLE_HOME/lib/activation.jar Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 9

The application is packaged within search.ear. Deployment of this ear within oses does not require restarting of oc4j. Configuration The web service end point is configured in web.xml. In order to deploy the same ear under different ses, orion-web.xml can be used to override the entries mentioned in web.xml. The location of the freemarker templates is also configurable. The path can be outside ear. This makes it easy to change the UI without a redeployment of the ear. The implementation is in such a way that, if the templates are not present in the configured path, it will be taken up from the ear. Deploying the Search Custom UI SES default namespace The default SES SEARCH UI has the name space /search/search. In order to use the same name space for the custom UI, the namespace for default UI has to be changed. In the implementation described here, the default search UI namespace has been changed to /default/search so that /search/search can be used by custom UI. Note: If the custom UI is being deployed in a different oc4j instance than OSES, there is no need of changing the namespace. How to change default name space is described below Creating Separate Namespace 1. Changes to the http-web-site.xml for the namespace change Backup file http-web-site.xml at $ORACLE_HOME/oc4j/j2ee/OC4J_SEARCH/config/ Original: <default-web-app application="search_query" name="welcome"/> <web-app application="search_query" name="query" load-on-startup="true" root="/search/query" /> <web-app application="search_admin" name="admin" load-on-startup="true" root="/search/admin" /> <web-app application="search_admin" name="ohw" load-on-startup="true" root="/search/ohw" /> <web-app application="monitor" name="monitor" loadon-startup="true" root="/monitor" /> Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 10

Add/Change the lines shown in bold below so that the applications listed include the root for the default query and the new namespace query as follows: <default-web-app application="search_query" name="welcome"/> <web-app application="search_query" name="query" load-on-startup="true" root="/default/query" /> <web-app application="search_admin" name="admin" load-on-startup="true" root="/search/admin" /> <web-app application="search_admin" name="ohw" load-on-startup="true" root="/search/ohw" /> <web-app application="monitor" name="monitor" loadon-startup="true" root="/monitor" /> <web-app application="search" name="search" loadon-startup="true" root="/search" /> 2. Back up and modify index.jsp at $ORACLE_HOME/oc4j/j2ee/home/default-web-app/. The new file will have this entry only: <% response.sendredirect(response.encoderedirecturl ("/search/search")); %> Purpose of this change is so that if someone types http://hostname:port, he is automatically redirected to custom UI and not to default search UI. 3. Back up index.html at $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applica tions/search_query/welcome/ Create a new index.html file with the following entry: <head> <meta http-equiv="refresh" content="0;url=/search/search"/> </head> Purpose of this change is so that if someone types http://hostname:port, he/she is automatically redirected to custom UI and not to default search UI. CONCLUSION To develop a custom UI as per the business requirements is a necessity. Oracle Secure Enterprise Search Web Services API lets you write your own application to query Oracle SES over the network. It is certified to work with Java. The API provides the following benefits: Applications can be deployed into any machine that connects to Oracle SES server through a standard Internet protocol. Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 11

Web Services protocol is XML-based, which makes for easy application integration. APPENDIX Freemarker Implementation The Custom UI implementation described here uses FreeMarker for UI implementation. FreeMarker is a "template engine", a generic tool to generate output based on templates. The template separates the actual UI definition from the jsp so that changing the template will not result in an ear redeplyment. The dynamic content to be displayed in the UI will be stored in a hashmap within the jsp and the static part will be within the template. The dynamic part will be associated to the template and can be accessed in the template by using the name by which it is stored within the hashmap such as ${<name>}. There can be a setting, which can be configured to set the time in seconds, which needs to elapse before freemarker checks for a newer version of the template. If this value is set to 0, every time when the template is loaded, freemarker will check for a newer version and any change made will be immediately effected. Details of freemarker can be found at http://freemarker.sourceforge.net/. Implementing a Custom Search Interface with SES - a case study with search.oracle.com Page 12

Custom UI Implementation using web services June 2006 Author: Ann Jacob Contributing Authors: Sudhir Dureja Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com Copyright 2006, Oracle. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.