The jhindexer Command

The jhindexer creates a full-text search database used by the JavaHelp system full-text search engine to locate matches. You can use the jhsearch command to verify the validity of the database.

To build a full-text search database use the following commands:

Win32

    jhindexer [options] [file | folder]*
Solaris/SPARC
    jhindexer [options] [file | folder]*
If the argument is a folder, the folder is searched recursively for JavaHelp system content files.

The following options are available:
-c file A configuration file name. See Config File below.
-db dir The name of the database output folder. By default the output folder is named JavaHelpSearch and is created in the current folder.
-locale lang_country_variant
The name of the locale as described in java.util.Locale. For example: en_US (English, United States) or en_US_WIN (English, United States, Windows variant).
-logfile file Captures jhindexer messages in a specified file. You can use this option to preserve jhindexer output on Win32 machines where the console window is dismissed after execution terminates.
-nostopwords Causes stopwords to be indexed in the full-text search database.
-verbose Displays verbose messages while processing.

Stopwords

You can direct the JavaHelp system full-text search indexer to exclude certain words from the database index--these words are called stopwords. By default, the indexer ignores (does not index) the following stopwords when it encounters them in your help topics:

a	all	am	an	and	any	are	as
at	be	but	by	can	could	did	do
does	etc	for	from	goes	got	had	has
have	he	her	him	his	how   	if	in
is	it	let	me	more	much	must	my
nor	not	now	of	off	on	or	our
own	see 	set	shall	she	should	so	some
than	that	the	them	then	there	these   this
those   though	to	too	us	was	way	we
what	when	where	which   who	why	will	would
yes	yet	you
You can override the indexer's default stopword behavior in two ways:

Config File

You can use the config file to:

Changing Path Names

You can remove and prepend portions of the topic file names as they are stored in the search database. This is useful when the path to the topic files you use during development is different from the path the help system will later use to find the topic files during searches.

To remove a portion of the path name from all of the indexed files:

Add the following line to the config file:

    IndexRemove path    
where path is the portion of the path you want removed.

For example, to change:


    /public_html/JavaHelp/demo/docs/file.html
to:
    docs/file.html 
add the following line to the config file:

    IndexRemove /public_html/JavaHelp/demo/
To prepend a different path to the indexed files:

Add the following line to the config file:


    IndexPrepend path  
For example, to change:

    docs/file.html
to:
    my_product/install/docs/file.html
add this line to the config file:
    IndexPrepend my_product/install/

Specifying Files for Indexing

You can also explicitly specify a list of the names of the files you want indexed. In the config file, specify the list in the following format:

    File filename
    File filename
    File filename
          .
          .
          .
Be sure to use "/" as the file separator when specifying files for indexing.

Specifying Stopwords

You can specify your own list of stopwords to the indexer using the config file. When you specify your own list, the default stopword list is not used. You can specify a list of stopwords in two ways:

See also:

Creating the Full-Text Search Database
The jhsearch Command
Localizing the Full-Text Search Database