PassMark Logo
Home » Forum


No announcement yet.

Highlight.js relocation fails, doesn't work

  • Filter
  • Time
  • Show
Clear All
new posts

  • Highlight.js relocation fails, doesn't work

    New Customer...

    Extensively searched the Forum - found good advice already, to earlier issues. Need advise on this one...

    Zoom: Professional, Version: 6.0, Build: 1009
    Server: Linux, Method: CGI

    Downloaded 02/07/2009: /Installed/Configured Zoom to index my 15,000 page website this Saturday. Impressive so far!

    Need highlighting.

    Setup all the config options correctly. Documents include the required html/scripts.

    Works fine!... if I include the highlight.js file in the SAME DIRECTORY as the document to be indexed, and leave the searched document's script (include) example set per the manual's example.

    But when I move the highlight.js file to another director, of course, changing the "src" script include--- Highlighting is no longer provided.

    Certainly a neophytes problem - but I need help.

    Please advise.

  • #2
    It should not really matter what folder the JS file is in, as long as you have the correct path set in each HTML file.

    My first guess would be simply that the path to the JS file is wrong.


    • #3
      Highlight.js relocation fails, doesn't work

      That's been my assumption, as well, and I assume I am doing something stupid, but have been unable to figure it out.

      I know the highlight.js file is in the cgi directory and I am using the following in my search results PAGE. NOTE: As stated in my first post, if I change the Script below to "src=highlight.js" (since I have another copy of the script in the same directory as my searched PAGE), highlighting works as advertised.

      <LINK href="../../../../inc/ubsource.css" type=text/css rel=stylesheet>
      <script type="text/javascript" src="../../../../cgi/highlight.js"></script>
      <body background="../../../../images/wall01a.gif" bgcolor="#bae9f8" text="#003399" onLoad="highlight();">
      <script type="text/javascript" src="../../../../pahdr.js"></script>

      The search form can be invoked at:

      Appreciate your response...


      • #4
        Found the problem. Poor choice of directory for highlight.js.

        I put it in the 'cgi' folder and the server was blocking the access request. Moved it to newly created folder and all is well.

        Appreciate your response!



        • #5
          Regarding the new highlight.js file.

          Improved highlighting in context descriptions: The highlighting in context descriptions has been improved such that words matching due to stemming, synonyms, or accent insensitivity options enabled can be highlighted.
          This does not work for me.
          Any suggestions?


          • #6
            Rather that just saying "does not work", can you give some details of what doesn't work. Maybe even an example. Are you sure you are even using the new JS file?


            • #7
              cardiogr - the feature you are quoting is for highlighting in the context descriptions. This is the text that appears on the search results page.

              This does not apply for the "highlight.js" javascript which is used to highlight words on the actual page. There is no simple way to implement such a feature in the "highlight.js" javascript without compromising download time for each page (by increasing size of the script significantly), and execution time (due to the computation needed to determine variations of all the words on the page) so we have no plans of doing this at this point.
              Wrensoft Web Software
              Sydney, Australia
              Zoom Search Engine


              • #8
                Thank you for your answer,

                I understand that calculating all the possible synonyms using javascript and highlighting them will slow down the loading of the webpage.
                If however a webpage has only a synonym matched (and not the original word searched), then you could change the generated link and instead of ?zoom_highlight=original_keyword it could be ?zoom_highlight=synonym.

                Could something like that be implementable?


                • #9
                  There can be dozens of matching words on a single page once stemming, synonyms, and accent insensitivity are taken into account. Even just with synonyms there can be multiple matches. While not technically impossible to deal with all of these the costs would seem to out weight the benefit.


                  • #10
                    Highlighting variants

                    How about passing only what is shown in the "hit list" summary for a given file? That way you're only dealing with a finite set (which you already have to enumerate to create the summary), and you avoid having no highlighting at all in files that do not contain the original search term. As it is, the highlighting appears to be "broken" on many pages.



                    • #11
                      That could work, while not perfect (there will still be many matched words that won't be highlighted), it would ensure that there is at least one word highlighted. We would still need to switch behaviour when there is no context descriptions enabled, so it would be confusing for most end users (that is, when context description is enabled, it will pass the matched word to the highlight script, when it is disabled, it will pass the matched word).

                      Nonetheless we will keep it in mind for a future version - especially if we hear from more people who would find this to be a worthwhile change on their site.
                      Wrensoft Web Software
                      Sydney, Australia
                      Zoom Search Engine