This repository was archived by the owner on Jan 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathjhindexer.html
More file actions
213 lines (199 loc) · 7.37 KB
/
Copy pathjhindexer.html
File metadata and controls
213 lines (199 loc) · 7.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--
* Copyright © 2003 Sun Microsystems, Inc
* All rights reserved.
* Notice of copyright on this source code
* product does not indicate publication.
*
* RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by
* the U.S. Government is subject to restrictions as set forth
* in subparagraph (c)(1)(ii) of the Rights in Technical Data
* and Computer Software Clause at DFARS 252.227-7013 (Oct. 1988)
* and FAR 52.227-19 (c) (June 1987).
* Sun Microsystems, Inc., 4150 Network Circle,
* Santa Clara, California 95054, U.S.A.
*
-->
<html>
<head>
<title>The jhindexer Command</title>
<link rel="stylesheet" type="text/css" href="../jhug.css" title="Style">
</head>
<body bgcolor="#ffffff">
<h2>The <code>jhindexer</code> Command</h2>
<p>
The <code>jhindexer</code> creates a full-text search database
used by the JavaHelp system full-text search engine to
locate matches. You can use the <a
href="jhsearch.html"><code>jhsearch</code></a> command to
verify the validity of the database.
<p>
To build a
full-text search database use the following commands:
<p>
<b>Win32</b>
<pre> <b>jhindexer</b> [<i>options</i>] [<i>file</i> | <i>folder</i>]*</pre>
<b>Solaris/SPARC</b>
<pre> <b>jhindexer</b> [<i>options</i>] [<i>file</i> | <i>folder</i>]*</pre>
If the argument is a folder, the folder is searched
recursively for JavaHelp system content files.
<p>
The following options are available:
<table width=98% border=0 cellpadding=5>
<tr valign="top">
<td width=40%><code>-c</code> <i>file</i>
</td>
<td width=60%>
A configuration file name. See <a href="#config">Config File</a> below.
</td>
</tr>
<tr valign="top">
<td width=40%><code>-db</code> <i>dir</i>
</td>
<td width=60%>
The name of the database output
folder. By default the output folder is named
<code>JavaHelpSearch</code> and is created in the current folder.
</td>
</tr>
<tr valign="top">
<td width=40%><code>-locale</code> <i>lang_country_variant</i>
<br>
<img src="../images/tablespacer150.gif" width="150" height="10">
</td>
<td width=60%>
The name of the locale as described in
<code>java.util.Locale</code>. For example: <code>en_US</code>
(English, United States) or <code>en_US_WIN</code> (English,
United States, Windows variant).
</td>
</tr>
<tr valign="top">
<td width=40%><code>-logfile</code> <i>file</i>
</td>
<td width=60%>
Captures <code>jhindexer</code> messages in a specified file.
You can use this option to preserve <code>jhindexer</code>
output on Win32 machines where the console window is
dismissed after execution terminates.
</td>
</tr>
<tr valign="top">
<td width=40%><code>-nostop words</code>
</td>
<td width=60%>
Causes <a href="#stopwords">stop words</a> to be indexed
in the full-text search database.
</td>
</tr>
<tr valign="top">
<td width=40%><code>-verbose</code>
</td>
<td width=60%>
Displays verbose messages while processing.
</td>
</tr>
</table>
<h3><a name="stopwords">Stop Words</a></h3>
<p> You can direct the JavaHelp system's full-text search indexer to exclude certain
words from the database index. These words are called <i>stop words</i>. By
default, the indexer ignores (does not index) the following stop words when
it encounters them in your help topics:
<pre>
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</pre>
<p>You can override the indexer's default stop word behavior in two ways: </p>
<ul type="circle">
<li>Use the <code>-nostopwords</code> option with the <code>jhindexer</code> command
to force the indexer to ignore stop words and to index every word in your
help topics.
<li>Use the <code>config</code> file to <a
href="#config_stopwords">specify your own list of
stop words</a>.
</ul>
<h3><a name="config"><code>Config</code> File</a></h3>
<p>You can use the <code>config</code> file to: </p>
<ul type="circle">
<li>Change the path names of the files as they are stored in the search database.
Use this option when you create the search database with paths to topic files
that are different from the paths the help system will later use to find them.
<li>Explicitly specify the names of the topic files you want indexed.
<li>Specify your own list of stop words.
</ul>
<p>Each of these options is described below.</p>
<h4>Changing Path Names</h4>
<p>
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.
<p>
<img src="../../images/hg_proc.gif" width="18" height="13"><b>To remove a portion of the path name from all of the
indexed files:</b>
<p>
Add the following line to the <code>config</code>
file:
<pre> IndexRemove <i>path</i> </pre>
where <i>path</i> is the portion of the path you want
removed.
<p>
For example, to change:
<pre> /public_html/JavaHelp/demo/docs/file.html</pre>
to:
<pre> docs/file.html </pre>
add the following line to the <code>config</code> file:
<pre> IndexRemove /public_html/JavaHelp/demo/</pre>
<img src="../../images/hg_proc.gif" width="18" height="13"><b>To prepend a different path to the indexed files:</b>
<p>
Add the following line to the <code>config</code> file:
<pre> IndexPrepend <i>path</i> </pre>
For example, to change:
<pre> docs/file.html</pre>
to:
<pre> my_product/install/docs/file.html</pre>
add this line to the <code>config</code> file:
<pre> IndexPrepend my_product/install/</pre>
<h4>Specifying Files for Indexing</h4>
<p> You can explicitly specify the names of the files you want indexed. In the
<code>config</code> file, specify the names in a list in the following format:
<pre> File <i>filename</i>
File <i>filename</i>
File <i>filename</i>
.
.
.</pre>
<p><img src="../../images/hg_note.gif"> Be sure to use "/" as the file separator
when specifying files for indexing. </p>
<h4><a name="config_stopwords">Specifying Stop Words</a></h4>
<p> You can specify your own list of stop words in the <code>config</code> file. When
you specify your own list, the indexer does not use the <a href="#stopwords">default
stop word list</a>. You can specify a list of stop words in two ways:
<ul type="circle">
<li>Add the list of words directly to the <code>config</code> file. Use the following
format:
<pre> StopWords <i>word, word, word...</i></pre>
<li>In the <code>config</code> file, specify the name of a file that contains a list
of stop words:
<pre> StopWordsFile <i>filename</i></pre>
The stop words file must list each stop word on its own line.
</ul>
<p>
<img src="../../images/hg_see.gif" width="18" height="13"><b>See also:</b>
<dl>
<dd><a href="search.html">Creating the Full-Text Search Database</a>
<dd><a href="jhsearch.html">The <code>jhsearch</code> Command</a>
<dd><a href="../locale/loc_search.html">Localizing the Full-Text Search Database</a>
</dl>
<p>
</body>
</html>