TetraBB PRO Documentation
TetraBB PRO offers a powerfull, multi-forum full-text search which serves as a replacement for the single-forum search feature available in Tetra-WebBBS.
Details on the search are listed below. To see the multi-forum search in action please go ahead and check it out here on tetrabb.com.
Features
- multi-forum search, beneficial esp. for sites with multiple forums/archives
- search for one or more words
- search for one or more phrases
- exclude posts with unwanted words or unwanted phrases
- optimized for speed and efficiency
- utilizes a keyword index database allowing for very fast searches using only very little CPU ressources
- keyword indexing of all words (optionally numbers) contained in message texts
- calculating relevance values for each word indexed
- configurable stopwords list for words to be excluded from indexing
- cached searchresults for fast retrieval of result listings
- searchresults are displayed on paginated pages of configurable length
- searchresults sorted by relevance of the searchterms
- searchresults display a teaser of the most relevant place where the searchterm was found
- searchterms highlighted in the teasers shown on searchresult pages
- optional listing of prior searches retrieved from the searchcache
- optional listing of suggestions based on the leading searchterm
- configurable indexing rules
- optional rebuild of keyword index database either via admin script or separate tool
- most frequent keywords listing visible to administrators for means of maintenance
Requirements and limitation
DB_File must be available on the server.
DB_File is the Perl interface module to the underlying Oracle Berkeley Database Engine.
Fortunately both, DB_File and the underlying Berkeley database are installed on almost any *nix server. On most Windows servers this condition is fulfilled as well.
The TetraBB PRO search is a full text search designed for optimized searches of messages texts.
Though calculation of relevance values for each word does take into account it's occurence in a messages' subject line, the search does NOT index words which occur only in message subject lines but not in the message text. Furthermore this extension does NOT allow for searches on poster names, IPs or anything other than the message text - that's why it's labeled a full "text" search
.
The PRO search finds results based on matching full words, it does not look for partial matches.
Configuration
- enabled/disabled the PRO search for the site.
The global setting ON/OFF can be overwritten in section(3) of entry scripts to a forum as long as all entry scripts (public/admin) to that forum are using the same setting for the PRO search! - specify minimum and maximum length of words to be indexed.
E.g.: very likely it's a waste of resources to index words of less than 4 characters length or very long words for which nobody will ever search. - indexing of numbers can be enabled/disabled.
Searching for numbers is useless on almost all boards, esp. because numbers could be written very differently. Take for instance 0.1 could be written as .1 or 0.10 - so likely indexing numbers is a waste of resourses. But the option of indexing is available. - configurable number of items displayed on searchresult pages
- configurable number of suggestions displayed on searchresult pages (optional)
- configurable number of recent searches displayed on searchresult pages (optional)
- configurable expiration time for cached searchresults
- configurable rebuilds
It's possible to optimize the rebuild procedure by specifying the size of the rebuild cache and the number of messages indexed on sequential rebuilds. - configurable minimum number of occurences for words to be listed on frequent keywords list
Administration
(Re-)Building the seachindex database
The searchindex database can be rebuilt by indexing all message datafiles of all forums.
The rebuild might be done using either the graphical interface provided by the admin scripts or by using a special commandline tool.
Using the commandline tool is recommended as indexing does take a lot of time and server resources which may not be available for webaccess. Sequential rebuilds are supported for the webinterface as well as for the commandline tool.
Before using the commandline tool for the first time, it's strongly recommended to read the detailed instructions found in it's config section.
Stopwords list/database
The PRO search optionally allows for stopwords. Stopwords are those common language words (or other frequently used words specific to your forum) which are considered useless for a search, thus not supposed to be indexed at all.
Examples for stopwords: *this* and *that*.
The list of stopwords is editable via admin scripts.
NOTE: Maintenance of stopwords is important. NOT indexing useless words saves a lot of resources!
Frequent keywords list
The PRO search allows for viewing the most frequently indexed keywords in your database.
One may use this information to trim the stopwords list to the optimum.
Options
Suggestions listing
The searchresults listing may contain a configurable number of suggestions.
Suggested words are based on partial matching of the first searchterm used for a search and represent keywords available in the searchindex.
Recent searches listing
Searchresults listing may contain a configurable number of searches recently performed.
This is a bit of bells'n'whistles but the data is there anyway and it's cheap to display them. So it's an option you may use if you think your audience will enjoy it - or you're curious yourself about what your audience searches on your site
.
Adding searchforms to your site/forums
You may optionally add a searchform to your site/forums wherever you think it's appropriate by simply adding the following HTML for instance to your Header.txt file or any other HTML you insert by placeholders in custom.pl or on any other page of your site.
Of course you must edit the URL pointing to your forum's entry script:
<form method='post' action='http://yoursite.com/path/to/entryscript.cgi?pro=search;pmd=go;srchid='>
<input type='text' name='sterms' size='30' maxlength='60' value=''>
<input type='submit' value='Search!'>
</form>
Preconfigured searchlinks
Imagine you're running a forum about animals. You know a lot of visitors are interested in "dolphins" and you know there are interesting articles about dolphins on your forum. You may create a simple HTML link which will start a new search on "dolphins" whenever it's clicked. Here is an example for that purpose:
<a href="http://yoursite.com/path/to/entryscript.cgi?pro=search;pmd=go;srchid=;sterms=dolphins">Dolphins</a>

![[+]](/i/toc_collapsed.gif)
![[-]](/i/toc_expanded.gif)
WebScripts










