Skip to main content
Inspiring
November 13, 2007
Answered

Duplicate topics in JavaHelp search results

  • November 13, 2007
  • 8 replies
  • 930 views
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?
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Stephen_B__Sealy
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------------------SearchRepair.bat--------------------------------------
setlocal
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.
)

endlocal
:myfinish
pause

REM------------------Sub_FixTheSearch.bat--------------------------------------
cd %HELP_HOME%
jhindexer -verbose -db helpset_JavaHelpSearch topics

REM------------------Sub_UpdateTheJar.bat--------------------------------------
cd %HELP_HOME%
jar -uf helpset.jar .\helpset_JavaHelpSearch\*.*

8 replies

Stephen_B__SealyAuthorCorrect answer
Inspiring
November 21, 2007
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------------------SearchRepair.bat--------------------------------------
setlocal
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.
)

endlocal
:myfinish
pause

REM------------------Sub_FixTheSearch.bat--------------------------------------
cd %HELP_HOME%
jhindexer -verbose -db helpset_JavaHelpSearch topics

REM------------------Sub_UpdateTheJar.bat--------------------------------------
cd %HELP_HOME%
jar -uf helpset.jar .\helpset_JavaHelpSearch\*.*
RoboColum_n_
Legend
November 19, 2007
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.
Participant
November 28, 2007
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?
RoboColum_n_
Legend
November 29, 2007
Try the method posted here. It may not work with JavaHelp but would be worth a try.
RoboColum_n_
Legend
November 13, 2007
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.
Inspiring
November 13, 2007
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.
RoboColum_n_
Legend
November 13, 2007
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.