### 18.10 Providing full-text search (FTS) for HTML Help

For HTML Help, full-text search is created as part of compiling a .chm with HTML Help Workshop; see §18.13 Compiling and testing HTML Help. With default settings, you get FTS automatically when DITA2Go generates HTML Help.

Note: The HTML Help FTS is built entirely by the Microsoft compiler, and stored in an undocumented binary format within the .chm file. Omni Systems cannot do anything about problems you encounter with its operation.

Omitting FTS

To prevent indexing for full-text search in HTML Help:

    [MSHtmlHelpOptions]
    ; UseFTS = Yes (default) or No (affects Help Project File rewrite)
    UseFTS = No

Specifying FTS in the .hhp file

The .hhp file for your project contains the setting for FTS, which DITA2Go includes by default while creating the .hhp file for you. If you create the .hhp some other way, you must make sure the .hhp file (not the DITA2Go configuration file) includes the following setting:

    [OPTIONS]
    Full-text search=Yes

Including topic titles in search results

For HTML Help to list the names of topics when a user clicks Search, you must specify titles for all topics, normally by assigning the Title property to the formats for all DITA topic headings and all other headings at which you split DITA files to create HTML Help topics. For example:

    [HTMLParaStyles]
    Heading1 = Split Title Contents
    Heading2 = Split Title Contents

See §27.5.2 Specifying page titles for split or extract files.

Indexing for FTS in another language

If you are preparing HTML Help in another language, you must run the compiler, which builds the FTS index, in the target locale. See §18.13.3 Compiling in a different language.

Excluding a topic from FTS

DITA2Go excludes a topic from full-text search by changing the topic file extension to .xhtml, even though the file is not actually XHTML. Only files with names containing the string .htm* get indexed (by HTML Help Workshop) for full-text search in HTML Help.

DITA topicref attribute @search (with value yes or no) allows you to specify whether the referenced topic is to be included in full-text search. DITA2Go excludes from HTML Help full-text search topics that are referenced with @search="no".

If your DITA maps do not include values for the topicref @search attribute, you can achieve the same effect with PI markers inserted in the topicrefs, and a ditaval file. For example:

    <?dthtm Search="no" ?>

In this example the effect on DITA2Go output is the same as if you had included @search="no" in the topicref for such topics.

Previous Topic: 18.9.8 Customizing contents and index for HTML Help

Next Topic: 18.11 Setting up CSH for HTML Help

Parent Topic: 18. Generating Microsoft HTML Help

Sibling Topics:

18.1 Understanding how DITA2Go produces HTML Help

18.2 Understanding why Unicode is not the answer

18.3 Setting up an HTML Help project

18.4 Customizing HTML Help display features

18.5 Creating pop-ups for HTML Help

18.6 Creating links and hypertext jumps in HTML Help

18.7 Creating related-topic links for HTML Help

18.8 Using secondary windows in HTML Help

18.9 Generating contents and index for HTML Help

18.11 Setting up CSH for HTML Help

18.12 Generating HTML Help in non-Western languages

18.13 Compiling and testing HTML Help

18.14 Mapping and merging CHM files