Excluding content from being Searched in RoboHelp Projects
Adobe RoboHelp,Technical Communication Suite,Exclude from Search,HAT
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 https://blog.adobe.com/media_259340fad93a27130fc85685e1013c03da89e551.gif) - 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 https://blog.adobe.com/media_ffd481d1c9bba70140f554f80184a98d6227b262.gif) - 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_:
-
- Search for lazy – you shall get hits for Second and Third Topic
-
- Search for Topic – you shall get hits for all the three topic
-
(See https://blog.adobe.com/media_fb13d2822e4b6b691b1c835fd828b67e19a5154b.gif) - 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:
-
- Search for lazy – No hits
-
- Search for Topic – you shall get hits for Second and Third Topic
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
pageTracker._initData();