This allows you to specify categories in your search engine, allowing your users to select from a drop-down to restrict searches to certain sections of your site. Each search result will also be tagged to indicate the category that they belong to. Searching with the “All” category will return results belonging to any of the categories.

To enable categories support, open the Configuration window and select the "Categories" tab. This will bring up the categories management list, where you can add, remove, and edit the categories.

Adding, editing and removing categories
When creating or editing a category, you have the following fields to specify:
1. | Category name: The name of the category must be unique. These category names will be listed in the drop-down box of the search page, or as check boxes if you have "Allow searching in multiple categories" selected. |
2. | Match pattern: The pattern is used to determine what pages belong to the category. It is matched against the pages’ full path or URL. This means that should the pattern appear anywhere on a page’s URL, it will be qualified for that category. Note that this includes the base URL or domain name of each page, so that you can index multiple domains, and have each defined as a separate category.
For example, a pattern of “test” will collect the following pages:
http://www.mysite.com/test.html
http://www.mysite.com/test/index.html
http://www.test.com/
… etc.
Tip: You can use patterns such as “.pdf” to create categories based on file extensions (eg. "PDF documents", "PowerPoint presentations", "Flash movies", etc.)
Category patterns are case insensitive. You can also use wildcard characters ("*" and "?") in your pattern. This means that you can create a pattern such as "/news/updates_*.pdf" which will get all PDF files, inside the news folder, with a filename starting with "updates_".
You can specify multiple patterns for each category, separated by a semi-colon character. For example, a category named “Downloads” may contain a variety of file formats with a pattern like “.pdf;.doc;.xls;.ppt;.exe” (without the quotes). Note that with multiple patterns, a file will only need to match any one of the listed patterns for it to qualify for that category.
For files which you can not match by a common pattern in the filename or URL, see "Specifying category per file". |
3. | Description: This is a short description of the category that will only be used internally in the indexer for your own convenience in the future. It is not a required field. |
4. | You can toggle the option of whether files caught by this category can belong to any other category. By default, this is off, which means that a file can belong to multiple categories (so long as it matches the category patterns). When this option is enabled for a category, a file caught by this category can no longer qualify for any other category.
Note that when using this option, you should be careful with the order of your categories. If your category patterns are too vague, or ordered incorrectly, you may have files grouped away in an earlier category, before it gets a chance to be matched against a later category that you intended it to fall under. |
You can use the up/down buttons to the right of the list to re-arrange the order of the categories. The order of the categories determines two things:
• | The order of which they will appear in the drop-down list of the search page, or (if you have "Allow searching in multiple categories" selected) the order of the check boxes on the search page. |
• | The process of selecting which category a page belongs to. This is important if you have any category using the "Files belonging to this category can not belong to any other category" option. This means that if a page is deemed to qualify for an earlier category (higher up in the list), it will not qualify for any other categories below it in the list. |

|
Note: Remember that you will need to re-index for your category changes to take effect.
|
Catch files not belonging to a category
This option allows you to toggle the use of a "catch-all" or "default" category, which will contain any files that did not fall in one of the specified categories in the list. You can use this to create a category for "Miscellaneous files" or "Other documents" by checking this option and specifying the category name in the text box.
Allow searching in multiple categories
This option will allow your users to restrict their searches for files belonging to multiple categories. If you are allowing Zoom to generate its own search form, this will change the category drop-down box to a checkbox selection list as seen below.

As always, you can customize the appearance of this category list via CSS, making it appear vertically or in any other layout. See "How do I customize the look of my search page?" and the "CSS class listing" for zoom_categories for more information.
Show category breakdown in search results ("Refine your search by ...")
This enables the displaying of a summary of the categories which your search results belong to. It allows your end users to see how many results belong to each category, and provides links to further refine their search by that category.

Specifying category per file
For files which have no easy way to be categorized by a pattern in the filename or URL, you can specify a category for these files on a file-by-file basis. You do this by adding a ZOOMCATEGORY meta tag within your file, like so:
<meta name="ZOOMCATEGORY" content="News">
Specifying the name of the category in the content part of the meta tag. This above example will categorize the file in the "News" category (overriding the URL/filename matching method).
You can specify multiple ZOOMCATEGORY tags within the same file if you wish to have the page belonging to more than one category. For example:
<meta name="ZOOMCATEGORY" content="News">
<meta name="ZOOMCATEGORY" content="Old website archive">
Importing categories
You can click on the "Import" button to import a list of categories from a CSV or text file. The comma separated text file should be in the following format:
<name>,<pattern>,<description>
Note that since each field is to be comma separated, you will need to enclose a field in quotation marks if you wish to specify a comma. For example:
News, /news/, This would be the news section
Articles, /articles_, Article webpages
"Links, resources, and other things", /links/, links to external sites
French, /fr_
As you can see in the above example, you can omit the description if one is not required. But a name and pattern is always required.
You can specify a category as being mutually exclusive (so that the file belonging to the category can not belong to any other category) by adding a fourth field on the line, like so:
Sales, /sales/,my sales related files,EXCLUSIVE
Note that importing categories will append to the existing list of categories already loaded. Note also that categories must have a unique name, and if a category with the same name already exists, it will be ignored on import.
|