Oracle Ultra Search Sample Crawler Agent Readme

Table of Contents

1. Introduction
2. Sample agent files
3. Setting up the Sample Crawler Agent

1. Introduction

Oracle Ultra Search provides a sample implementation of user defined data source agent which uses the Ultra Search agent API. The purpose of this sample is to provide a concrete illustration on the usage of the agent APIs.

Upon invocation this sample agent connects to a specified Oracle database and retrieve the contents of a table for the crawler to collect and index.

The sample agent are fully functional and can be customized to adapt to other database based data source. This agent performs the following task:

Complete and comprehensive documentation on agent API is provided in the following document:

2. Sample Agent Files

3. Setting up the Sample Crawler Agent

3.1 Compile and build agent jar file

The java source code for the sample agent must be first compiled into class files and put into a jar file under $ORACLE_HOME/ultrasearch/lib/agent/ directory. The classes needed for compilation are the JDK class (classes.zip), Oracle JDBC thin driver (classes12.zip), and ultraserach.jar. For example,

   javac -J-ms16m -J-mx96m -O -classpath /jdk1.2.2_05/lib/classes.zip:/lib/classes12.zip:
   $ORACLE_HOME/ultrasearch/lib/ultrasearch.jar SampleAgent.java
  

To build the sampleAgent.jar file:

  /jdk1.2.2_05/bin/jar cv0f /oracle/ultrasearch/lib/agent/sampleAgent.jar 
  SampleAgent.class 'SampleAgent$DocNode.class'
  

3.2 Creating a data source type

A data source type that uses the sample agent must be created first.

3.3 Defining data source parameters

Parameter that defines a data source type are defined.

3.4 Defining a data source of this type

A data source is defined which initialize the data source parameters. As an example, The value specified here is used to access a table whose schema is:

    TABLE NEWS (
    ARTICLE_NO    NUMBER,
    NEWS_URL      VARCHAR2(740),
    TITLE         VARCHAR2(200),
    AUTHOR        VARCHAR2(100),
    PUB_DATE      DATE default SYSDATE,
    PUBLISHER     VARCHAR2(100),
    PRICE         NUMBER,
    LANG          VARCHAR2(10),
    IGNORE        NUMBER DEFAULT 0,
    PRIMARY KEY (NEWS_URL)
    );