<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Tags</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="mnoGoSearch 3.3.9 reference manual" HREF="index.html"><LINK REL="UP" TITLE="Subsections" HREF="msearch-subsections.html"><LINK REL="PREVIOUS" TITLE="Subsections" HREF="msearch-subsections.html"><LINK REL="NEXT" TITLE="Multiple languages support" HREF="msearch-international.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="mnogo.css"><META NAME="Description" CONTENT="mnoGoSearch - Full Featured Web site Open Source Search Engine Software over the Internet and Intranet Web Sites Based on SQL Database. It is a Free search software covered by GNU license."><META NAME="Keywords" CONTENT="shareware, freeware, download, internet, unix, utilities, search engine, text retrieval, knowledge retrieval, text search, information retrieval, database search, mining, intranet, webserver, index, spider, filesearch, meta, free, open source, full-text, udmsearch, website, find, opensource, search, searching, software, udmsearch, engine, indexing, system, web, ftp, http, cgi, php, SQL, MySQL, database, php3, FreeBSD, Linux, Unix, mnoGoSearch, MacOS X, Mac OS X, Windows, 2000, NT, 95, 98, GNU, GPL, url, grabbing"></HEAD ><BODY CLASS="sect1" BGCOLOR="#EEEEEE" TEXT="#000000" LINK="#000080" VLINK="#800080" ALINK="#FF0000" ><!--#include virtual="body-before.html"--><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" ><SPAN CLASS="application" >mnoGoSearch</SPAN > 3.3.9 reference manual: Full-featured search engine software</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="msearch-subsections.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 8. Subsections</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="msearch-international.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="tags" >Tags</A ></H1 ><A NAME="AEN3688" ></A ><P >Tag is a special character string parameter which can be assigned to a set of documents to group them into a logical subsection of the search database. At search time you can specify a tag value to limit searches to only a desired group. You can also pass the tag limit to <SPAN CLASS="application" >indexer</SPAN > to have it re-crawl only the given group of the documents, or perform any other actions on the group, like watching statistics for the group, deleting the documents belonging to the group and so on. </P ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="tags-adding" >Adding tags</A ></H2 ><P > Use the <B CLASS="command" ><A HREF="msearch-cmdref-tag.html" >Tag</A ></B > command in <TT CLASS="filename" >indexer.conf</TT > to assign a tag value to a site, a site part, or a group of sites. For example: <PRE CLASS="programlisting" > Tag cars Server http://www.ford.com/ Server http://www.toyota.com/ Tag computers Server http://www.sun.com/ Server http://www.apple.com/ </PRE > </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="tags-search" >Using tags at search time</A ></H2 ><P > When sending a search query, you can specify a tag value to limit searches to the desired subsection of the database with help of the <CODE CLASS="parameter" >t</CODE > parameter to <SPAN CLASS="application" >search.cgi</SPAN >. You may find useful to add a <TT CLASS="literal" >SELECT</TT > search form variable into the search form in <TT CLASS="filename" >search.htm</TT >: <PRE CLASS="programlisting" > Search through: <SELECT NAME="t"> <OPTION VALUE="">All sites</OPTION> <OPTION VALUE="cars">Cars</OPTION> <OPTION VALUE="computers">Computers</OPTION> </SELECT> </PRE > Take a look into <A HREF="msearch-cmdref-tag.html" >Tag</A >, <TT CLASS="filename" >indexer.conf-dist</TT > and <TT CLASS="filename" >search.htm-dist</TT > for more details and examples. </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="tags-substring" >Using substring tag match</A ></H2 ><P > Starting from the version <TT CLASS="literal" >3.1.x</TT >, tags are stored in the database as character strings and support patterns with help of <ACRONYM CLASS="acronym" >SQL</ACRONYM > <B CLASS="command" >LIKE</B > operator with <TT CLASS="literal" >_</TT > and <TT CLASS="literal" >%</TT > wildcards and thus support substring searches on tags. </P ><P > <P ><B >Nested tags</B ></P > <ACRONYM CLASS="acronym" >SQL</ACRONYM > <B CLASS="command" >LIKE</B > patterns also make possible to have nested tag. For example, the documents with the tag value <TT CLASS="literal" >computers-hardware</TT > can be found using any of the following tag patters: <TT CLASS="literal" >computers-%</TT >, <TT CLASS="literal" >computers-hardware</TT >, <TT CLASS="literal" >%-hardware</TT >. </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="tags-multiple" >Multiple selections</A ></H2 ><P > Playing with <B CLASS="command" >LIKE</B > wildcards you can make a document match multiple tag selections. For example, the tag <TT CLASS="literal" >ABCDE</TT > will match all of the following patterns: <PRE CLASS="programlisting" > _BCDE A_CDE AB_DE ABC_E ABCD_ </PRE > </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="tags-indexer" >Using tags with <SPAN CLASS="application" >indexer</SPAN ></A ></H2 ><P > To limit an <SPAN CLASS="application" >indexer</SPAN > action to a desired tag use the <CODE CLASS="option" >-t</CODE > command line option. For example: <PRE CLASS="programlisting" > indexer -t cars -S </PRE > will display statistics for the documents associated with the tag <TT CLASS="literal" >cars</TT >. </P ><P > You can also use multiple <CODE CLASS="option" >-t</CODE > options. For example: <PRE CLASS="programlisting" > indexer -t cars -t computers -am </PRE > will mark all documents from the tags <TT CLASS="literal" >cars</TT > and <TT CLASS="literal" >computers</TT > as <SPAN CLASS="emphasis" ><I CLASS="emphasis" >expired</I ></SPAN > and will re-crawl to these documents forcing full update information about the documents. </P ><P > The <CODE CLASS="option" >-t</CODE > command line option also understands <ACRONYM CLASS="acronym" >SQL</ACRONYM > <B CLASS="command" >LIKE</B > patterns. This command: <PRE CLASS="programlisting" > indexer -t "c%" -C </PRE > will delete information about all documents associated with <SPAN CLASS="emphasis" ><I CLASS="emphasis" >any</I ></SPAN > tag starting with the letter <TT CLASS="literal" >c</TT > from the search database. </P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="msearch-subsections.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="msearch-international.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Subsections</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="msearch-subsections.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Multiple languages support</TD ></TR ></TABLE ></DIV ><!--#include virtual="body-after.html"--></BODY ></HTML >