Omni Systems, Inc. |  | Mif2Go User's Guide, Version 55 |  |  |  |  |

> 11 Generating JavaHelp or Oracle Help > 11.5 Providing full-text search for JavaHelp / Oracle Help > 11.5.2 Creating a search index for JavaHelp

### 11.5.2 Creating a search index for JavaHelp

JavaHelp utility program JHIndexer creates a search index for JavaHelp, and places the search index in a subdirectory called JavaHelpSearch. You can have Mif2Go run JHIndexer, or you can run it yourself. In addition to creating a search index, you must also provide a link to the search index from the helpset file; see §11.5.1 Including a search-index link in the helpset file.

Let Mif2Go create FTS

To have Mif2Go automatically run JHIndexer:

[JavaHelpOptions]

; FTSCommand = for Sun Java Help, path to jhindexer, such as:

FTSCommand = D:/jh2.0_01/jh2.0/javahelp/bin/jhindexer

The value of FTSCommand must include an absolute path to the directory where the JHIndexer program is installed on your system. If the path includes spaces, you must enclose it in double quotes. For example:

[JavaHelpOptions]

FTSCommand = "G:/JH/jh2.0 01/jh2 0/javahelp/bin/jhindexer"

Do not enclose parameters in quotes:

• Use backslashes as separators in path-name parameters.

• Use a dash (“-”) instead of a forward slash to prefix a command option.

When you specify a value for FTSCommand, after generating output files for JavaHelp, Mif2Go first removes any search-index directory previously created by JHIndexer, then uses the command to run JHIndexer and produce a new search index.

If you also specify a value for [Automation]WrapPath, Mif2Go copies all needed files from the project directory to the JavaHelp directory structure before running JHIndexer; see §11.3.7.2 Letting Mif2Go set up the directory structure and copy files.

You might also want to set the following option, so you can see any error messages that result:

[Automation]

; KeepCompileWindow = No (default)

; or Yes (so any error messages can be seen)

KeepCompileWindow=Yes

When KeepCompileWindow=Yes, a system window opens when the indexer runs. If there are no indexer errors, you will see only a command prompt when indexing finishes. You must dismiss the window before Mif2Go can continue processing.

Create FTS yourself

If you do not specify a value for FTSCommand, you must run JHIndexer yourself, from the directory where your helpset file is located, and specify the directory where the HTML files are located. For example, at a Windows command prompt:

D:

cd \path\to\MyOutput\help

del /f /q JavaHelpSearch

path\to\JavaHelp\files\bin\jhindexer html

If you are using a directory structure such as the following for your project, run JHIndexer from the Help directory:

MyDoc (FrameMaker files)

..MyOutput (Mif2Go files)

....Help (JHM, HS, TOC, Index; run JHIndexer from this directory)

......HTML

......Graphics

Your structure ends up looking like this:

MyDoc (FrameMaker files)

..MyOutput (Mif2Go files)

....Help (JHM, HS, TOC, Index)

......JavaHelpSearch (Created by JHIndexer)

......HTML

......Graphics

JavaHelp search caveats

It is best to remove any previous search-index directory before you run JHIndexer to create a new directory. If a previous attempt to create a search index failed, further attempts will also fail if the failed search-index directory is present.

You must run JHIndexer from the directory where the helpset file is located. If you try to run JHIndexer from within the HTML directory, JHIndexer will put the JavaHelpSearch directory inside the HTML directory. If you try to run it from any other directory, you get strange effects in the Contents panel.

See also:

§7.2.4 Compiling and distributing Help systems

§11.3.7.2 Letting Mif2Go set up the directory structure and copy files

§11.3.7.4 Specifying a path for search-index links

§11.5.1 Including a search-index link in the helpset file

§35.10 Gathering and processing Help-system files

> 11 Generating JavaHelp or Oracle Help > 11.5 Providing full-text search for JavaHelp / Oracle Help > 11.5.2 Creating a search index for JavaHelp

| Mif2Go User's Guide: 11.5.1 Including a search-index link in the helpset file |  | Mif2Go User's Guide: 11.5.3 Creating a search index for Oracle Help |