Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle Help
11g Release 2 (11.1.2.0.0)

Part Number E16280-01
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

11 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 of the Text Search Indexer are provided, one for Japanese content and another for non-Japanese content.

This topic contains the following sections:

11.1 Java Requirements

The Text Search Indexer requires Java5 Standard Edition or later. Performance is greatly enhanced if you leave the Java JIT (Just In Time Compiler) on. Also ensure that you increase the heap size of the Java Virtual Machine to maximum.

11.2 Running the Indexer

Follow these steps to run the indexer:

  1. Include the OHJ Indexer JAR file helpindexer-version.jar in your CLASSPATH.

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

    [-l=locale] [-e=charset] dirnameindexfilename
    

    where,

    Argument Description
    -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 a Java supported character set encoding names; for Java SE, see http://download.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html
    dirname The base directory that contains the HTML files you want to index. The indexer indexes all of the files under this directory (and its subdirectories, if any).
    indexfilename The name of the index file to be generated.

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

    The above command sets the Locale to language: English, country: Unites States, encoding: 8859_1, and indexes the D:\MyHTMLFiles directory creating the myIndex.idx file.

11.3 Running the JapaneseIndexer

Follow these steps to run the indexer:

  1. Include the OHJ Indexer JAR file helpindexer-version.jar in your CLASSPATH.

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

    [-e=charset] dirnameindexfilename
    

    where,

    Argument Description
    -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 a Java supported character set encoding names; for Java SE, see http://download.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html.
    dirname The base directory that contains the HTML files you want to index. The indexer indexes all of the files under this directory (and its subdirectories, if any).
    indexfilename The name of the index file to be generated.

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

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