mnoGoSearch 3.2.33 reference manual: Full-featured search engine software
Prev |  | Next

# Chapter 6. Subsections

# Categories

Beginning from version 3.1.1 mnoGoSearch has nested categories support.

There is a categories editor written in PHP3 and Perl. You can get it from mnoGoSearch downloads page.

Categories are similar to the tag feature, but nested. So you can have one category inside another and so on.

Basic points:

- there are up to 6 nested levels;

- every level occupies 2 hex or 36 base digits;

- the parameter for setting category is a path, which can be empty (meaning it is the root category) or up to 10 chars long (meaning it is the deepest category).

You can also set up symlinks, e.g. categories that are actually links to other categories. This is the role of the link database field. In the symlink, the last two characters should be @@. In example above Moto->BMW is a link to Auto->BMW.

First notice that a category in the server table is set to be 11 characters long. This means you can use a valid character to keep track of the categories. If you are going to keep a category tree of any size, then I would suggest using the category editor from mnoGoSearch downloads page. But anyway, here's how it works.

You can use either the tag column or the category column on the server to do the same thing. Or you can categorize a site in two different ways. For example you could keep track of sites that are owned by a certain company and then categorize them as well. You could use the tag option to keep a trace of ownership and use the category option for categories. When I explain the category option, note it goes the same for the tag option.

A category can be broken down any way you choose. But for it to work with the category editor, I believe for now, you have to use two characters for each level. If you use the category editor you have the choice to use a hex number going from 0-F or a 36 base number going from 0-Z. Therefore a top-level category like 'Auto' would be 01. If it has a subcategory like 'Ford', then it would be 01 (the parent category) and then 'Ford' which we will give 01. Put those together and you get 0101. If 'Auto' had another subcategory named 'VW', then its id would not be 01 because it belongs to the 'Ford' category but 02 because it's the next category. So its id would be 0102. If VW had a sub category called 'Engine' then it's id would start at 01 again and it would get the 'VW' id 02 and 'Auto' id of 01, making it 010201.

If you want to search for sites under that category then you could pass it cat=010201 into the url...so you could create a select box that would look like that:

    <OPTION value="01">AUTO
    <OPTION value="0101">Ford

and so on...

Prev | Home | Next
IBM DB2 notes |  | Tags