This is a problem that I had to solve at work today. We are using JavaHelp for our On-Line help. Like many other have found issues with the Full Text Search so have we. What's the issue? Well, the selection on the help page is of by a few characters and continuously increases until the end of the page. Near the end of the page the selection of the searched word is completely off (see the issue on the Bug Database, a.k.a. Bug Parade).
This issue doesn't happen with JavaHelp 2.0.4 (fetch it from this page - here is the direct link). But for those of you that can't use it just yet, because of the wonderful tool you are using, there is a simple workaround:
- Unpack the HelpSet in trouble to a new folder. For instance, if the HelpSet is named help.jar extract it to the folder help);
- In that folder there will be a XXX_JavaHelpSearch folder that contains the full text search index. Delete that folder. In our example it will be called help_JavaHelpSearch, very intuitive...
- Standing in the extract folder (help in our example), run the jhindexer of the new JavaHelp on all html documents. For instance, if all documents are in the folder docs you just run "jhindexer docs/*.html".
- The jhindexer tool creates a JavaHelpSearch folder. Rename it to whatever you found in step 2. For instance, rename it to help_JavaHelpSearch.
- Add all the files to a new JAR file without any additional directories. You can do this by standing in the extract folder (help in the example provided) and issuing "jar cfv ../newjar.jar *". After this you have a new HelpSet in the newjar.jar file in which the Full Text Search selects the text properly.