Activity - addIndexFile

Activity Type: Indexed Files

Description

The use of this activity requires the jar: "lucene-1.4-final.jar" to be loaded on the server, to handle file indexing.

Import a new text file into the file system and generate an index with the full-text search engine Jakarta Lucene.

Examples

<addIndexFile name="addfile">
    <fromLocal from="data"/>
    <filename>uniprot.dat</filename>
    <directory>data</directory>
    <filetype>SwissProt</filetype>
    <field>ID</field>
    <field>AC</field>
    <index>index</index>
</addIndexFile>

Specification

Element addIndexFile:

Configuration

A configuration file must be provided for this activity. The configuration contains information about the flat file types that can be indexed by this activity and the helper classes used. The location of the configuration file is specified in the activity configuration document.

For example:

<configuration>
   <fileIndexer implementation="uk.org.ogsadai.activity.indexedfiles.SwissProtIndexWriter"
                filetype="SwissProt"
                analyzer="org.apache.lucene.analysis.standard.StandardAnalyzer" />
   <fileIndexer implementation="uk.org.ogsadai.activity.indexedfiles.OMIMIndexWriter"
                filetype="OMIM"
                analyzer="org.apache.lucene.analysis.standard.StandardAnalyzer" />
</configuration>

Element configuration - root element of the configuration:

Warning to Service Deployers

This activity can be used by clients to potentially access any directory on your server below that exposed by the associated OGSA-DAI service.

XML Schema

OGSA-DAI/schema/ogsadai/xsd/activities/add_index_file.xsd

Implementation

OGSA-DAI/src/java/activities/uk/org/ogsadai/activity/indexedfiles/AddAndIndexFileActivity.java