PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Multiple search_templates

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple search_templates

    So i have been tasked with modifying the search results for the HR portion of our site. Since we are active in upteen different countries and each country has a different set of HR rules, we have divided out search up by directories...

    /US...United States
    /UK...United Kingdom
    /BR...Brazil
    /SG...Singapore
    /SI...Slovenia
    etc.

    Now we have a batch file that re-indexes/updates the index every weekend.

    But every time the various countries get reindexed, the search_template.html file gets rewritten.

    Is there a way to modify the *base* search_template so the same look and feel passes to each country as it is reindexed?

  • #2
    If an existing search_template.html file exists in the output directory, Zoom should not overwrite it. If this file does not already exist in the output directory, a default template is created.

    How do you have batch script setup? Do you have a configuration file for each country? Do they have separate output directories?

    Is there a way to modify the *base* search_template so the same look and feel passes to each country as it is reindexed?
    From the "Templates" Menu, choose an option in "Customize search script appearance".

    Comment


    • #3
      Originally posted by Richard View Post
      If an existing search_template.html file exists in the output directory, Zoom should not overwrite it. If this file does not already exist in the output directory, a default template is created.

      How do you have batch script setup? Do you have a configuration file for each country? Do they have separate output directories?



      From the "Templates" Menu, choose an option in "Customize search script appearance".

      Yes, we have a batch job that invokes the Indexer for each separate config file (since the config file is ascii we have an php script that creates each config), and each config file points to a separate directory.

      So when we index the site for each individual country (different countries have access to different documents), we create a different index for each country. And a separate search_results.html file.

      So what i am looking for is a way to modify the base template file before it is modified for a given index.

      Comment


      • #4
        Originally posted by catdragon View Post
        Yes, we have a batch job that invokes the Indexer for each separate config file (since the config file is ascii we have an php script that creates each config), and each config file points to a separate directory.
        As Richard pointed out, Zoom doesn't overwrite the "search_template.html" file in the output directory if one is already there.

        So typically, for your scenario, you would have a different .zcfg configuration file per index. With each configuration, you would point the Output Directory to a different folder for that particular index.

        The important thing here is that you don't move the files from the Output Directory. If your batch script is moving the files from the output directory to some other location, then the Output directory will now be empty (and no longer have an existing "search_template.html" file), and the next time you index, a new one will be generated, and your batch script will then move that to the new folder overwriting your other files.

        So usually, you would just point the Output Directory to the final destination of where you need the index files to be hosted on the web server.

        If you need to use FTP, you can either leave the files in the folder after (as mentioned above) so that the re-index will see the previous template, or you can check the option "Do not upload search template (Requires existing file on server)".
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          OKay, forget the word "move" the files are being put in the right directory. I have no problems with that.

          Let me restate:

          i have a structure of multiple directories, one for each country and one for each role within that country. I have a php that modifies my configuration file to change the output directory to the appropriate place as well as "spider" through the web pages appropriately.

          When Zoom executes the configuration file and finishes the indexing, it places the search results template in the correct place.

          Because multiple search results html files are being created, i would like to know if there is a way to modify the original search_template.html file, the file that each directory's search_template.html uses as its base.

          Does that make better sense?

          Comment


          • #6
            Originally posted by catdragon View Post
            Because multiple search results html files are being created, i would like to know if there is a way to modify the original search_template.html file, the file that each directory's search_template.html uses as its base.
            Yes, assuming you are using the PHP or ASP version, you can change the file directly at:
            C:\ProgramData\Wrensoft\Zoom Search Engine Indexer V7\scripts\PHP or ASP\search_template_src.html

            For the CGI version, look in similar subfolder at the "scripts" level of the above path.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              Thank you very much. I appreciate it.

              Comment

              Working...
              X