Zoom Search Engine FAQ - Howto's

Q. How do I modify the appearance of the search form?

You can now modify the appearance of the search form via CSS. Please see our FAQ on How do I customize the appearance of my search page with CSS for more information. This is the easiest and most recommended way to customizing the search form.

An alternative is to disable the search form that is generated by the script, and define your own form (in HTML) on the search page template. The disadvantage to this method is that your custom search form will not maintain search queries and options after a search (as it does by default, when you use the script generated version).

To disable the search form generated by the script, open the Configuration window in the Indexer, and click on the "Search Page" tab. Under the "Search Form" option, select "Do not generate" from the drop-down box.

To define your own search form, see the following FAQ question.

As an example, you can change the "Submit" or Search button to use an image by placing the following line within the rest of the HTML form (see following question).

<input type="image" src="images/submit.gif" alt="Submit" border="0">

Q. How do I add a simple search box to each page of my site?

After you have indexed your site and uploaded the search files. A simple search box can be added to any page using the following HTML form.

<form method="get" action="search.php">
<input type="text" name="zoom_query" size="20" />
<input type="submit" value="Search" />
</form>

Note that the action attribute, search.php, might need to change depending on the location of the script and the script language you are using. For example if you are using ASP and and the search files are in a subdirectory called /search then you will need an action like,

<form method="get" action="http://www.mysite.com/search/search.asp">

See the next question for more details.

For examples of more "attractive" search boxes (using images for search buttons, and curved text boxes, etc.), please click here .

Note that if you are trying to add a search box to an ASPX page, you should refer to this FAQ.

Q. How do I put search forms on different pages of my website? (Or define my own search form?)

The following is an example of the HTML search form you can use on any of the pages of your website in order to include a search form. Of course, you can modify the look of the form as you wish, but please note the name of the parameters (such as zoom_query, zoom_per_page, etc).

<form method="get" action="search.php">
<input type="text" name="zoom_query" size="20" />
<input type="submit" value="Search" />
<small> Results per page:
<select name='zoom_per_page'>
<option selected="selected">10</option>
<option >20</option>
<option >100</option>
</select><br /><br />Match:
<input type="radio" name="zoom_and" value="0" checked="checked" />any search words
<input type="radio" name="zoom_and" value="1" />all search words </small>
</form>
  • ASP users will need to replace "search.php" with "search.asp"
  • JavaScript users will need to replace "search.php" with "search.html"
  • Note: remember to take in to consideration the path or location of the search files (eg. search.php, etc.) relative to the page you are putting this HTML form in.

You may also want to disable the search form that is automatically displayed at the top of the search results page (so that it doesn't appear twice). You can do this from the "Search page" tab of the Configuration window. For the "Search form" dropdown option, select "Do not generate".

For more information on how to do this, please see the Search script and Optimising and configuring your search engine section of the Users Guide.

You can also refer to the search bar at the top of this very site as a working example.

Defining a search form for a categories enabled website:

If you want your search box to simply search all categories (and not show a categories dropdown box), then add this line of HTML to your form:

<input type="hidden" name="zoom_cat[]" value="-1">

However, if you want to actually include the categories dropdown box in your custom search form, then you will need to specify your categories manually. Because these options vary depending on your categories configuration, we can not provide the exact HTML you will require. The best method is to simply allow the search script to generate the full search form once, click on "View Source" in your browser and copy and paste the categories HTML required for your particular configuration. For your reference, it should look something like the following:

<select name='zoom_cat[]'>
<option value="-1">All</option>
<option value="0">News</option>
<option value="1">Articles</option>
<option value="2">Misc.</option>
</select>

Note again that the above HTML would vary depending on the categories you have specified in the Zoom Indexer Configuration window, and that we recommend looking at the script generated form to ensure that you have the correct HTML for your configuration.

Note that if you have "Allow searching in multiple categories" enabled, you may need to use checkboxes instead (since radio buttons only allow you to have one option selected). This may look something like the following:

<input type="checkbox" name="zoom_cat[]" value="-1" checked="checked">All</input>
<input type="checkbox" name="zoom_cat[]" value="0">News</input>
<input type="checkbox" name="zoom_cat[]" value="1">Articles</input>

Q. How do I make the search results open in a new window (or different frame)?

If you wish to make the links from the search results page open in a new window, you can do this by changing the "Results linking" option in the Configuration window, under the "Search Page" tab. You can also specify the name of a frame or window to open them in. Note that this only refers to the actual links back to the web pages of your indexed site, that was found by the search engine.

However, if you wish to make the actual search results page (i.e. the page listing the results) open in a new window (right after you enter your query and hit "Submit"), then you will need to define your own search form as described in the above FAQ, but with the following <form> tag:

<form method="GET" action="search.php" target="_blank"> ... </form>

Note that the "target=" value can be changed from "_blank" to the name of the frame or window that you wish to open the results in. See the FAQ for using Zoom on a frames-based website for an example of this.

If you are doing this, you can also turn off the search form shown at the top of the search results (so that it doesn't appear twice) via the "Search form" setting in the Configuration window (under the "Search Page" tab).

Q. How do I use Zoom on a frames-based website?

If you are trying to spider index your site, Zoom supports parsing links from a frames-based site, so it is no longer necessary to use the sitemap as your start spider URL.

If you want to place a search form somewhere on your website, such as in a certain frame, and produce the results in a different frame - you can do this by defining the search form independently of the search script and setting the target value to the name of the results frame. So, if the frame you want the results to appear in is called "main", in your navigation bar HTML file, define the search form as:

<form method="GET" action="search.php" target="main">
...
</form>

If you are doing this, you can also turn off the search form shown at the top of the search results (so that it doesn't appear twice) via the "Search form" setting in the Configuration window (under the "Search Page" tab).

See the FAQ on defining your own search form for more information.

Also see the FAQ on making search results open in a frame.

Q. How do I index multiple domains or sub-domains as one site (in spider mode)?

You can specify multiple start points to begin indexing from in both spider mode and offline mode. This can be accessed by clicking on the "More" button next to the Start Spider URL or Start folder.

In spider mode, this allows the spider to span across multiple websites or domains. With each of these additional URLs you can also specify a spidering option ("index page and follow links", "index single page only", "follow links only", etc.), click on Help in this window for more information. You can also import or export these start points from a text file. More information in our PDF Users Guide.

In offline mode, you can specify multiple folders that may be under different root paths to be indexed. Note that all folders under each Start directory are indexed unless they match a pattern in the Skip page or folder list.

Q. How do I setup a search page for different categories/parts of a website? Or for multiple domains?

Zoom now has a Categories feature which allows you to index your website into specific areas or categories, and allowing your visitors to select from a drop-down box on the search page to restrict searches to certain sections of your website. More information on this available in our PDF Users Guide.

You can also create multiple search pages for each part of your website. First option is, you can index each sub-site seperately, producing a group of index files for each domain. Place each of these in a seperate sub-directory, along with a copy of the search script. Then you can provide a central page, with multiple forms, pointing to the appropriate sub-directory and search script. An example would be:

/search.html
/zoom_wordmap.zdat, zoom_titles.zdat, etc...

/news/search.php
/news/zoom_wordmap.zdat, zoom_titles.zdat, etc...

/science/search.php
/science/zoom_wordmap.zdat, zoom_titles.zdat, etc...

/library/search.php
/library/zoom_wordmap.zdat, zoom_titles.zdat, etc...

where search.html contains two forms, one with a target="news/search.php", and the other with a target="library/search.php". That is,

Search our news archive!
<form method="GET" action="news/search.php">
...
</form>

Search our library catalog
<form method="GET" action="library/search.php">
...
</form>

Please also refer to How do I define my own search form?

This is usually practical for sites where each domain offers a fairly different categorical area, but you require a central search page for them.

Q. How can I speed up the search results?

There are several things you can do to make Zoom produce faster search results on your website. First of all, the most important factor is the size of your index file. The smaller the index, the better, and by carefully indexing your website (skipping parts of the website which are not necessary - such as the forums with built-in search) would not only speed up the search function on your website, it would also return more effective and useful search results. This is especially true if your website is translated to Unicode languages such as Japanese, Chinese, Korean, and others. These webpages can not be successfully indexed and will only result in a larger, slower, and less effective index file.

Other ways to speed up your search results include turning off the search word highlighting feature, and/or reducing the number of results displayed per page.

Some more advice regarding speed:

  • The CGI binary is faster than the PHP and ASP scripts which are in turn faster than JavaScript. The tradeoff is that the CGI can be harder to install than PHP or ASP.
  • Searches using exact phrase or wildcards can be slow on large sites. So
    don't enable "substring match for all searches" unless you really need it.
  • Also check that your server is not already over loaded with other activity
    if your searches are slow. Search times are mainly dependant on disk speed and CPU power. See the benchmark page for expected search performance.

Q. How do I enable highlighting?

You can enable highlighting of keywords found in the search results by checking the option "Words matched in search results" on the "Results Layout" tab of the Configuration window.

This option only highlights the matching words on the search result listing. If you wish to have the searched words highlighted on your actual page (i.e. after clicking on a search results link), you will need to enable the "Jump to match and highlight within document" option. Please see this FAQ for details on how to enable and use this feature.

Please note that highlighting functionality is limited and it does not ensure that all keywords used to retrieve the search result will be highlighted. For example, if a search word matched because of a synonym, or use of the "accent insensitivity" feature, then the keyword may not be highlighted, despite it being considered a matching search result.

Q. How do I allow partial matching?

You can allow words to match partially by using wildcards. eg, a search for "*car*" will match "cars", "carrying", "vicar", etc. See our search tips page for more information.

If you wish to make this the default behaviour of all searches (so that a user does not have to enter in wildcards, and "car" will always match the results above), then you can do this by enabling "Substring match for all searches" in the Configuration window of the Indexer.

However, note that this is not recommended by default, as it was designed to cater for East Asian languages (where words are not separated by spaces). It may produce conflicting results when used alongside wildcards and exact phrase matching, so please experiment with it first if you decide to use it.

Q. How do I prevent parts of my webpage from being indexed (eg. navigation menus or page footers)?

You can put <!--ZOOMSTOP--> and <!--ZOOMRESTART--> tags to mark the sections of your page which you do not want to be indexed. Note that both tags must be present as a pair for this to work. See the following example:

<p>This text will be indexed</p>
<!--ZOOMSTOP-->
<p>This section is skipped and no indexing will occur.</p>
Navigation menus, header, footer, etc. may appear here.
<!--ZOOMRESTART-->
<p>Indexing starts again here</p>

You can also use <!--ZOOMSTOPFOLLOW--> and <!--ZOOMRESTARTFOLLOW--> to specify sections of a page containing links that the spider should not follow. Note that the text within this section will still be indexed when this is used alone.

Note: If you put these changes into place and try to re-index immediately after, you may find that you're still indexing from a cached copy of the webpage (without these changes). To make sure this does not happen, check the option "Reload all files (do not use cache)" in the "Spider options " configuration window.

Q. How do I block parts of my website from being indexed (eg. block entire folders or individual files)?

You can use the page and folder skip list in the Zoom configuration window to block pages or entire folders from being indexed. This is a list of pages and folders that will not be scanned during the indexing process. Note that filenames and paths are case sensitive. Typically you would want to filter pages that the user should never be able to get to directly via the search function. e.g. a private section of you site.

Note that if the path to a page partially or fully matches any entry in this list it will be filtered.

Example 1: An entry in the skip list of, /cat will result in all of the following files being ignored.
/cat/document1.html
/cat.html
/catalogue/document2.html
/catsanddogs/document3.pdf
/animals/cats/fuzzy/big.pdf
etc....

You could liimit skipping to just 'cat' folders for the above example by adding an additional /, for example, /cat/
would only skip
/cat/document1.html
/animals/cats/fuzzy/big.pdf

Example 2: An entry in the skip list of, www.mysite.com/private/ will result in all files in the 'private' directory on the domain mysite.com being excluded from the index.

When indexing in spider mode the skip list is compared against the URL of the page being indexed. When indexing in offline mode the skip list is compared against the file name page being indexed.

Q. How can I force cursor focus on the search box?

The behaviour of your cursor focus (where your typing cursor appears when a page is loaded) is dependent on your browser. To change this behaviour on your page, you will need to use Javascript. This can be achieved in a number of different ways.

One simple example would be to have the following onLoad script as part of your body tag on the search template page:

<BODY onLoad="document.getElementById('zoom_query').focus()">

As is the nature of all Javascript on web pages, you will need to test the script carefully and be aware of how they work to some extent to avoid conflicts with existing scripts.

Q. How do I create a self-contained search engine that runs on a CD-ROM (using JavaScript) without a webserver?

First confirm that using the Javascript option for your CD search function is the best option.

Then if you decide to use the Javascript option, you must index your site with the Output format set to "JavaScript" in the indexer's configuration window. This will generate a data file named "zoom_index.js" in the output directory you have selected.

Note that the base URL you specify should be a relative path ("./" for the current directory, or "../" for the previous directory, or "/" for the root directory) or a valid absolute file path in the form of "file:///c:/my documents/".

Second, you will have to copy this file (zoom_index.js), along with search.js and search.html into the same directory. Now when you open up search.html in your web browser, you should be able to perform searches on the index data you have generated.

For more information on configuring and customising the search page, refer to chapter 4 of the User's Guide - Client-side search (Using JavaScript).

Q. Are there other, more powerful options, for adding a search engine to a CD-ROM?

Yes, we now have a dedicated page describing the CD search options here.

Q. How do I schedule Zoom to automatically index on a regular basis with Windows Scheduler?

You can schedule the Zoom Indexer to automatically index your website regularly with the built-in Zoom Scheduler. See here for more information.

Q. How do I schedule Zoom to automatically create reports?

You can schedule the Zoom Indexer to regularly generate reports for your website with the built-in Zoom Scheduler. See here for more information.

Q. How do I setup Zoom for foreign language (non-english) support?

See our new foreign language support page for more information.

Q. How can I add internal keywords that will not affect external search engines?

Zoom allows you to manually add keywords onto a page that is not already present in the text of the page itself. By doing this it is possible to have search matches on commonly misspelt words and synonyms of words that do appear on the page.

There are two ways to add keywords to a page. One is using the "ZOOMWORDS" meta-tag in the HTML header of that page. For example, on a page about music, you can add:

<meta name="ZOOMWORDS" content="melody, mellody, tune, song">

The second way is to use the standard <meta name="keywords"> tag which is also supported. However, note that some external Internet search engines (such as Google) ignore or even penalise a page’s rank if they find what they consider to be excessively repeated words, so the ZOOMWORDS metatag is provided to allow you to ‘force’ page ranks internally, within your own website, without affecting external search engines.

Q. How can I use Zoom to index my site stored in a database (eg. SQL, Access, etc.)?

We have moved this topic to a separate FAQ page to provide more comprehensive information.

Q. How should I index my site if it features a message board, forum, or calendar and other similarly complex scripts?

We have moved this topic to a separate FAQ page to provide more comprehensive information.

Return to our Zoom Search Engine Support page