Excluding content from being Searched in RoboHelp Projects



I have met a number of technical communicators who are interested in excluding some topics from being searched in a RoboHelp published project. Adobe RoboHelp doesn’t’t support this natively however, since I see a lot of interest in doing the same, today, I shall describe a procedure that will help you exclude specific topics and even content in a topic from being searched.

Here is what you have to do:

  • Create a Conditional Build Tag, say “Exclude_from_Search”. I have created a sample Adobe RoboHelp 7 project. You can download (DOWNLOAD NOW) the same and work on it.
  • Apply this CBT to all the topics in the Project Manager that you want to be excluded from the Search. Here in the sample project, I have applied the CBT to Third_Topic.htm in the project manager.
  • Apply this CBT to content within a topic that you would want to exclude from Search. In the sample project, I have applied CBT to some text in the Second_Topic.htm

    (See larger image)

  • In the SSL, create a special SSL that excludes all the content that is tagged with "Exclude_from_Search” CBT. All you have to do is create a new WebHelp SSL, name it "Exclude from Search" and then click on its Properties and Define Condition Build Expression as “NOT Exclude_from_Search” and then Save the same.

    (See larger image)

  • Now generate output for both the WebHelp SSL‘s – "WebHelp" and "Exclude from Search". You can even use the Batch Generate option to do that in a single shot.

    Quick test in the WebHelp output
    1) Search for lazy – you shall get hits for Second and Third Topic

         (See larger image)

    2) Search for Topic – you shall get hits for all the three topic

         (See larger image)

  • Now we need to replace the index generated in the "WebHelp" output with the one that is generated in the "Exclude from Search" output. Follow the steps listed below to do the same:
    • Now browse to the output folder of the "WebHelp" output. The default location would be “<Project Path>\<Project Name>\!SSL!\WebHelp”
    • Browse to folder “whxdata” under the WebHelp folder.
    • Search and delete whf*.* files in this folder.
    • Copy whf*.* files from the corresponding folder in the Exclude from Search output (“<Project Path>\<Project Name>\!SSL!\Exclude from Search\whxdata”) and place them in this folder (“<Project Path>\<Project Name>\!SSL!\WebHelp\whxdata”).

      Please note that you have to delete all files and copy files and not do a replace operation as the number of files might be different.

    Quick test in the WebHelp output after patching the index:
    1) Search for lazy – No hits

    (See larger image)

    2) Search for Topic – you shall get hits for Second and Third Topic

         (See larger image)

I just hope that you will now be able to exclude content from being searched in RoboHelp published projects using this procedure till we build native support in the product.

– Akshay


Akshay Madan

Posted on 04-22-2008

Join the discussion