Sun Java System Portal Server 7 Developer's Guide

Chapter 29 Developing a New Database or Search Engine Connector

This chapter includes instructions for developing a new database/search engine connector.

Developing a New Search Engine Connector

Federated search feature in Portal 7 supports the 4 types of federated search but not limited to these 4 types. Users can develop a new federated search connector following the steps described in this section.

ProcedureTo Develop a New Federated Search Connector

Steps
  1. Implement the Database Connector class.

    Develop the Java interface class to connect to the new database server/search engine. This Java class must implement the RDMDb interface and implement the necessary methods (refer to any of the sample connector classes).

  2. Implement the Search Result class.

    Develop the Result Set Java class to manage returned results and convert the results to SOIF format for display. This Java class must extend RDMResultSet and implement result handling methods accordingly (refer to any of the sample result set classes).

  3. Modify build.xml file and compile your code.

    Once you have generated the JAR file, add your JAR file to the web container class path. If the new database server/search engine requires certain vendor-specific API library (for example, googleapi.jar for Google), add the library to the class path as well. The sample programs developed for this feature are already included in searchserver.jar file.

  4. Generate database configuration data.

    Add the configuration data for the new database server/search engine to the sampledbs.soif file. Follow the attribute naming convention and SOIF syntax when editing the file. The configuration data is used by the Database Connector class to connect to the target server and submit a query.

  5. Develop front-end Search interface.

    Modify the Search channel JSP accordingly to add your new database name. The name must be the same name used in sampledbs.soif file.