Tags

Tag is a special parameter which can be given for a set of documents. The main purpose of tags is to join a number of documents into a group and then, while doing a search, to select a group of documents to search through.

You can use the Tag command in indexer.conf to give some tag value for a server or server subset. While doing a search you can specify a tag value to search through documents whose tag match a given parameter with the t=xxx syntax, which can be passed from an HTML form. Take a look into Tag, indexer.conf-dist and search.htm-dist for more explanations and examples.

Tags in SQL version

Starting from version 3.1.x, tag type was changed from INT to CHAR. The CHAR type provides the use of some nice features. Due to the fact that, since 3.1.x, the tag is tested against the SQL LIKE operator, you can use '_' and '%' LIKE wildcards in the tag parameter when doing a search. It makes it possible for a tag, like a category, to support an idea of nesting. For example, documents with tag value "AB" can be found with both "A%" and "AB" tag limits.

Tags also provide a way to make an URL a member of multiple tag selections. Playing with LIKE wildcards you can easily create two or more groups.

For example, tag "ABCDE" is the member of at least these selections:


_BCDE
A_CDE
AB_DE
ABC_E
ABCD_

Note: If your database is big enough and you often use tag limits, adding an index on the column "tag" in the table "server" can improve search performance. This index is not created by default.


CREATE INDEX srv_tag ON "server" ("tag");