Skip navigation header
Authoring Oracle Help Systems Table of Contents
Contents
Previous topic
Previous
Next topic
Next

Using the Text Search Indexer

A Java-based text search indexer is included with Oracle Help for Java. The indexer generates the .idx files used for text searches within Oracle Help. Two versions are included, one for all content that is not in Japanese, and another for Japanese content.

This topic contains the following sections:

Java Requirements

Run the indexer with JDK 1.1.7 or later. Performance will be greatly enhanced if you leave on the Java JIT (Just In Time Compiler). You should also be sure to increase the maximum heap size of the Java Virtual Machine, as shown in the examples below.

Running the Indexer (for non-Japanese Content)

  1. Include the OHJ Indexer JAR file (help-indexer-version.jar) on your CLASSPATH by setting the CLASSPATH environment variable or by setting the CLASSPATH directly on the command line.

  2. Run the indexer from the command prompt. The indexer supports the following command-line arguments:

    [-l=locale] [-e=charsetdirname indexfilename

    where

    -l=locale
    The optional (but recommended) locale parameter is specified using the two letter ISO 639 language codes and ISO 3166 country codes. The format is language_COUNTRY or language_COUNTRY_VARIANT. If the locale is not supplied, the system default locale is used.
    -e=charset
    The optional (but recommended) charset parameter is the name of the Java-supported character set encoding for the HTML files that are being indexed. If the encoding is not supplied, the default character set encoding of the current system default locale is used. If supplied, the value must be one of the Java supported character set encoding names, for JDK 1.1 see:
    http://java.sun.com/products/jdk/1.1/docs/guide/intl/encoding.doc.html
    dirname
    The base directory that contains the HTML files you want to index. The indexer will index all of the files under this directory (and it's subdirectories if any).
    indexfilename
    The name of the index file to generate.

    For example,

    java -mx64m oracle.help.tools.index.Indexer -l=en_US -e=8859_1 D:\MyHTMLFiles myIndex.idx

    The above sets the Locale to be Language English, Country Unites States, sets the encoding to be 8859_1, and indexes the D:\MyHTMLFiles directory creating the myIndex.idx file as a result.

Running the JapaneseIndexer (for Japanese Content)

  1. Include the OHJ Indexer JAR file (help-indexer-version.jar) on your CLASSPATH by setting the CLASSPATH environment variable or by setting the CLASSPATH directly on the command line.

  2. Run the indexer from the command prompt. The indexer supports the following command-line arguments:

    [-e=charsetdirname indexfilename

    where

    -e=charset
    The optional (but recommended) charset parameter is the name of the Java-supported character set encoding for the HTML files that are being indexed. If the encoding is not supplied, the default character set encoding of the current system default locale is used. If supplied, the value must be one of the Java supported character set encoding names, for JDK 1.1 see:
    http://java.sun.com/products/jdk/1.1/docs/guide/intl/encoding.doc.html
    dirname

    The base directory that contains the HTML files you want to index. The indexer will index all of the files under this directory (and it's subdirectories if any).

    indexfilename

    The name of the index file to generate.

    For example:

    java -mx64m oracle.help.tools.index.JapaneseIndexer -e=MS932 D:\MyHTMLFiles myIndex.idx

    The above runs the JapaneseIndexer with the encoding set to be MS932, and indexes the D:\MyHTMLFiles directory creating the myIndex.idx file as a result.