8 Replies Latest reply on Nov 29, 2007 6:30 AM by RoboColum(n)

    Duplicate topics in JavaHelp search results

    Stephen B. Sealy
      Using RoboHelp HTML X5.0.2 to create JavaHelp output, I have a problem in the resulting full-text search feature. If the search text is in a popup topic, the topic appears twice in the search results.

      I investigated the output and found that every topic that is linked as a popup has two files in the output -- the second one with a "_popup_topic" suffix. For example, aba_routing_nbr.htm also has an aba_routing_nbr_popup_topic.htm file in the output.

      Is there a way to keep this from happening?
        • 1. Re: Duplicate topics in JavaHelp search results
          RoboColum(n) Level 5
          Hi Stephen.
          This sounds like you have mouse over popups in your help file. Is this right? It also seems like these popups are being included in the search results as well as the actual HTM files. I'm not sure what the solution is apart from don't use JavaHelp There may be a solution out there but as a former JavaHelp user who lost most of his hair whilst he was forced to use it, I couldn't wait to get rid. It's search function is nothing short of hopeless. You may be able to get around the issue if you stop using mouse over popups.
          • 2. Re: Duplicate topics in JavaHelp search results
            Stephen B. Sealy Level 1
            The hyperlink option is "Display in custom-sized popup." It's not a mouse-over popup. In the TrueCode editor, it is implemented using javascript:BSSCPopup.
            • 3. Re: Duplicate topics in JavaHelp search results
              RoboColum(n) Level 5
              Any sort of popup is a no-no in Javahelp. Check out this link and check out the Popup Window Accessibility section for further details. There is also an excellent topic in the RH help on the limitations of JavaHelp.
              • 4. Re: Duplicate topics in JavaHelp search results
                Stephen B. Sealy Level 1
                The 8-year-old help system is for a Java application on a desktop. It began with coding HTML and JavaScript in Notepad. We converted it to RoboHelp in 2002. The popups have always worked. I think initially we turned off the full text search feature because we got too many hits on the field-level popup topics. But at some point, the help author turned the feature on, and the QA group noticed the problem.

                I've done some more research, and here is what I've found:

                1) Popups, the way we have coded them, are supported for RoboHelp's JavaHelp output.

                2) Creation of the output topics with the "_popup_topic" suffix is the expected behavior. It goes back at least to RoboHelp 2000, and still happens in RoboHelp 7. It is described in an old STC article at . http://stc-pbc.org/pdf%20files/JavaHelp_article-mwebb.pdf. However, I have not seen an explanation of why it happens. I compared two of the duplicate files using TextPad and found that they were identical.

                3) It seems that no one else has ever reported this particular problem. Maybe most of those who write JavaHelp are so technically savvy that they solve the problems themselves.

                4) RoboHelp does not document any way of excluding files from the JavaHelp full-text search. However, the JavaHelp System User's Guide describes a couple of ways to do it.

                5) I found one article that said WebHelp could be used with Java applications. I don't think this was an option when we made the decision to use JavaHelp, but it may be worth investigating now. As you noted, JavaHelp is pretty lame.

                I see three possible solutions to my problem:

                -- Tell the help author to turn off the search feature.

                -- Write a batch file to recompile RoboHelp's JavaHelp output, omitting the popup topics from the search.

                -- Convince the development team to use WebHelp instead.

                Any other ideas?

                • 5. Re: Duplicate topics in JavaHelp search results
                  RoboColum(n) Level 5
                  Hi Stephen. Thanks for posting such a comprehensive reply. It will be useful if others hit the same problem in the future.
                  In HTML help it is possible to exclude topics from the search by changing the file extension to .XHTM. I have never tried this in Javahelp but if you do this maybe the suffixed topics would be excluded. Failing that, either your option 2 or 3 are the way forward. Option 1 would be a non-starter for me.
                  • 6. Re: Duplicate topics in JavaHelp search results
                    Stephen B. Sealy Level 1
                    I've written batch procedures to update the compiled JavaHelp. For now, I'll mark this as the answer to the problem, unless someone replies with an improvement. There are three batch files. The main procedure is SearchRepair.bat. The two sub-procedures are Sub_FixTheSearch.bat and Sub_UpdateTheJar.bat. I run SearchRepair.bat after compiling the RoboHelp project with the "Compressed JavaHelp with source files" option.

                    The jhindexer call in the Sub_FixTheSearch.bat file targets only the \topics folder, omitting the \popuptopics folder that contains all of the popup files -- including the duplicates.

                    Here is the batch procedure code:

                    REM ----- Set the variables ----------
                    set HELP_HOME=C:\MyJavaHelpTest\OnlineHelpOutput

                    set JAVA_HOME=C:\j2sdk1.4.2_13\bin
                    set MYJAVAHELP_HOME=C:\jh2.0\javahelp\bin

                    set PATH=%PATH%;%JAVA_HOME%;%MYJAVAHELP_HOME%
                    set MY_STARTING_DIR=%CD%

                    REM ----- Update the Search Database ----------
                    call Sub_FixTheSearch
                    if %errorlevel% GTR 0 (
                    echo Problem updating the search database.
                    goto myfinish

                    REM ----- Update the JAR file ----------
                    cd %MY_STARTING_DIR%
                    call Sub_UpdateTheJar
                    if %errorlevel% EQU 0 (
                    echo Everything worked right.
                    goto myfinish
                    ) else (
                    echo Problem updating the JAR file.


                    cd %HELP_HOME%
                    jhindexer -verbose -db helpset_JavaHelpSearch topics

                    cd %HELP_HOME%
                    jar -uf helpset.jar .\helpset_JavaHelpSearch\*.*
                    • 7. Re: Duplicate topics in JavaHelp search results
                      I am having trouble excluding popup topics from the Search function in RoboHelp 7.0 HTML. Colum, you mentioned that you can exclude topics from the search by changing the topic extension to "XHTM". I tried to change this under "Topic Properties" but was not able to do so. How do you change the topic extension?
                      • 8. Re: Duplicate topics in JavaHelp search results
                        RoboColum(n) Level 5
                        Try the method posted here. It may not work with JavaHelp but would be worth a try.