Skip to main content

... troubleshooting search text highlighting ...

4 replies [Last post]
Anonymous

Hello All,

I'm running into a sticky wicket with javahelp 2.0 when it comes to
getting search text highlighting to work for one of my sets of
documentation. I'm at a loss for how to determine the cause of the problem.

Background: We have 2 sets of documentation that we offer in both
JavaHelp format and in plain HTML. The first is our javadocs, which we
create using ANT's javadoc task. The second is our own product manual.
We run the indexer on both sets of documentation directly via a custom
ANT task we've created. Searching works fine for both sets of JavaHelp
product. That is, all of the pages that match the search terms are
correctly presented, and the relative strength of a match is correctly
represented in the search results. When the user clicks on the desired
topic in the search results, the correct page is displayed -- this also
is true for both sets of JavaHelp product.

However, in the case of our product manual, the text highlighting is
seemingly random. The relative length of the search term (that is, the
length of the string) is mirrored in what is highlighted. If, for
example, I search for "attribute" (a 9-char string), all of the
highlighted strings are 9 chars in length, but the highlighted strings
are seemingly random -- including parts of two words, spanning
sentences, etc.

Given a highlighting problem like this, what are the likely causes for
erroneous search term highlighting, and are there any recommendations
for isolating and correcting the cause(s)?

Many thanks,
-- R

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Roger Brinkley

Randy Novick wrote:

> Given a highlighting problem like this, what are the likely causes for
> erroneous search term highlighting, and are there any recommendations
> for isolating and correcting the cause(s)?

Different JDK used to generate search database than used to display.

Bugs in line counting that makes the offset incorrect.

Binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Randy Novick

It sounds plausible. I do use a different JDK in my build environment
from the one we ship, after all.
However, JDK mismatch would affect both sets of documentation in the
same way, would it not?
Only one of my sets of javahelp docs have the search term highlighting
problem.
How does one account for this, given the possibility of a JDK mismatch?
-- R

Roger Brinkley wrote:

> Randy Novick wrote:
>
>
>> Given a highlighting problem like this, what are the likely causes for
>> erroneous search term highlighting, and are there any recommendations
>> for isolating and correcting the cause(s)?
>
>
> Different JDK used to generate search database than used to display.
>
> Bugs in line counting that makes the offset incorrect.
>
> Binky
>
> ********************************************************************************
>
>
> You may leave the list at any time by sending message with no subject and
> "SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM.
> Archives
> are available at
> http://archives.java.sun.com/archives/javahelp-interest.html.
> Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.
>

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Roger Brinkley

Randy Novick wrote:

> It sounds plausible. I do use a different JDK in my build environment
> from the one we ship, after all.
> However, JDK mismatch would affect both sets of documentation in the
> same way, would it not?
> Only one of my sets of javahelp docs have the search term highlighting
> problem.
> How does one account for this, given the possibility of a JDK mismatch?

It can be a bug as well. It all depends on how well we are matching to
the HTMLEditorKit positions. Sometimes we don't put in a position where
the HTMLEditorKit does and vice versa.

binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

larry hoffman

In past releases this kind of behavior is caused by something in
the HTML files; for example, at one point image maps caused
similar problems (moving the map to the end of the file served as
a workaround. I would recommend that you isolate a file that causes the problem
in a test helpset and keep eliminating stuff in the file until you
find the culprit. That's what I've done in the past.

Larry

Randy Novick wrote:
> Hello All,
>
> I'm running into a sticky wicket with javahelp 2.0 when it comes to
> getting search text highlighting to work for one of my sets of
> documentation. I'm at a loss for how to determine the cause of the problem.
>
> Background: We have 2 sets of documentation that we offer in both
> JavaHelp format and in plain HTML. The first is our javadocs, which we
> create using ANT's javadoc task. The second is our own product manual.
> We run the indexer on both sets of documentation directly via a custom
> ANT task we've created. Searching works fine for both sets of JavaHelp
> product. That is, all of the pages that match the search terms are
> correctly presented, and the relative strength of a match is correctly
> represented in the search results. When the user clicks on the desired
> topic in the search results, the correct page is displayed -- this also
> is true for both sets of JavaHelp product.
>
> However, in the case of our product manual, the text highlighting is
> seemingly random. The relative length of the search term (that is, the
> length of the string) is mirrored in what is highlighted. If, for
> example, I search for "attribute" (a 9-char string), all of the
> highlighted strings are 9 chars in length, but the highlighted strings
> are seemingly random -- including parts of two words, spanning
> sentences, etc.
>
> Given a highlighting problem like this, what are the likely causes for
> erroneous search term highlighting, and are there any recommendations
> for isolating and correcting the cause(s)?
>
> Many thanks,
> -- R
>
> ********************************************************************************
>
>
> You may leave the list at any time by sending message with no subject and
> "SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
> are available at
> http://archives.java.sun.com/archives/javahelp-interest.html.
> Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.