Skip to main content
Known Participant
September 29, 2009
Answered

Modifying the search in a chm

  • September 29, 2009
  • 10 replies
  • 1979 views

Is it possible to modify the search in a.chm so that only relevant topics to your search keyword show up? I came across this site that makes it possible to improve the webhelp by editing some Jscript code, but I wasn't sure if it was possible in a .chm:

http://www.helpscribe.com/2008/10/improving-webhelp-search-results-in.html

If anyone has any ideas, it'd be greatly appreciated!

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Pete_Lees

Hi Rick,

Sorry, I probably didn't explain my problem well. Basically what I want to do is have RH search just the topic names, instead of the content within the topic. For example, if a user searches for "client file" the search should bring up "Creating a Client File" first.

In Windows Explorer, I changed some of the file extensions to .xhtm and that worked out well. RH stopped searching the content within those topics I changed. However, in my actual RH project the topics are marked with red Xs.

If I try to change the file extensions in RH, RH says there's a topic with that name already and asks me to choose a different name. Should I change the file extensions in RH or in Explorer or both?

Thanks again for your help!


Hi, TechWriter77,

To be honest, I think the simplest solution is to educate your users to select the "Search titles only" checkbox at the bottom of the Search tab. Or you could instruct them in how to construct quite sophisticated searches by incoporating the information in the following page into your Help file:

http://helpware.net/htmlhelp/hhfindingtext.htm

As Rick says, the workaround of changing the file name extensions of the HTML topic files is a blunt instrument that prevents the compiler from parsing any of the content of those topics for full-text search data — including the topic titles. So, you'd need to find some other solution that enabled you to encrypt the body of the topics (so hiding it from the compiler) but leave the topic titles untouched. Even if this is possible, it seems like a lot of work for little gain. It could be frustrating for users, too, if they're searching for a term that they know is present but which you haven't included in a topic title.

Pete

10 replies

RoboColum_n_
Legend
September 30, 2009

I can't see how this is possible with a CHM file as it is a single compiled file. The only way to restrict what appears in the search is to not include it in the compile in the first place.


Read the RoboColum(n).

RoboWizard
Inspiring
September 30, 2009

Hi there

As Colum indicated, there is little you can do to "improve" the search mechanism in a CHM file.

One little known trick, however, is that you may change a topic file name from having a .HTM extension to a .XHTM extension. You will still be able to link to it but the content of the topic won't be found in the search.

I learned that little nugget from Pete Lees. (Tips hat toward Pete)

Cheers... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!

Adobe Certified RoboHelp HTML Training

SorcerStone Blog

RoboHelp eBooks

Known Participant
September 30, 2009

Thanks guys for the information. It's much appreciated as always.

Rick, for your suggestion, is there a way to change the default extension of all the .htm files to .xhtm at once?