Excluding certain DITA topics from search results

There are several ways to exclude certain DITA resources from your WebHelp system's search results. This is useful if you have topics in your DITA map structure that you do not want to be included in search results for your WebHelp system. The first method involves setting a parameter in the WebHelp transformation scenario and the second involves setting an attribute for each DITA topic reference that you want to exclude.

To exclude DITA topics from WebHelp search results using a transformation parameter, follow these steps:

  1. Create a simple text file that will contain your excluded file patterns. Each pattern must be on a new line. The patterns are considered to be relative to the output directory and they accept wildcards such as '*' (matches zero or more characters) or '?' (matches one character). For more information about the patterns, see https://ant.apache.org/manual/dirtasks.html#patterns.
    For example, suppose that in your project, you want to exclude all files located in the resources directory and all files located in the topics directory that have a .bak file extension. You could create a simple text file (for example, named exclude.properties), and add the following lines:
    resources/*
    topics/*.bak
  2. Edit the WebHelp transformation scenario and open the Parameters tab.
  3. Set the webhelp.search.custom.excludes.file parameter to specify the path to the file that contains the excluded file patterns (for example, exclude.properties in step 1).
  4. Run the transformation script.