glFusion Wiki

Site Tools


Searcher Plugin for glFusion

This plugin provides a very improved search function for glFusion using one or more index tables to allow fulltext-type searching without requiring a fulltext index.


glFusion does not maintain a search index for content, instead it will search all content types (i.e.; stories, comments, pages, wiki, media, forums, etc.) and then combine the results always forcing each content type a place in the search results view. While this provides a reasonably decent method to display search information, it does not always provide relevant info or present the results in the best format.

Searcher solves this problem by indexing all the content types, providing weights for title, author, and content and also accounting for number of times a term appears in the content. When performing a search, results are presented in weighted order, generally providing much more relevant results first.


To allow Searcher to find content, it has to be indexed first. This is done as content is created or changed so the impact is very low on the system. But, when you first install Searcher, it needs to index all existing content. This can take a significant amount of time depending on the size of your site. For example, here at, it takes a couple of hours to scan and index all our content, mainly because we have several thousand forum posts. Fortunately,the batch indexer is smart enough to re-index in such a way to prevent overloading the server.

Indexes can be quite large - again here at, we have over 3 millions rows in our index table. This isn't a problem, but simply a reflection that the index table can become very large over time as your content grows. Databases are engineered to handle these large tables without much issue.

The only concern is on really large sites, if your hosting provider has any limitations on the amount of disk space that can be used by MySQL, you could run into a problem. Our 3 million row table takes around 500mb of disk space.

Initial Installation

When you first install the Searcher Plugin, you must have it index all the content on your site.

  1. Navigate to Command & Control → Searcher → Reindex Content
  2. Select all the content types you wish to index (generally this should be all of them)
  3. Select the Reindex Button

Depending on the size of your site, indexing the content can take a significant amount of time. Keep the browser window open until it is finished. The indexing engine is built to ensure it does not overload the server during the initial indexing of content.

Once the initial index is built, glFusion will automatically keep the index up-to-date as you add, modify or delete content.


The Searcher plugin is configured through the global glFusion configuration system (Command & Control → Configuration → Searcher).

Display Name
Override the display name of “Searcher” if you like.
Minimum Word Length to Consider
When indexing and searching, words with fewer than this number of characters will be ignored. Default: 3.
Max Words in a Phrase
This is the maximum number of words that will be considered in a phrase. Increasing this number will target the most relevant search results but will significantly increase the time and database size for the index. Default: 3.
Results to Show per Page
This is simply the number of search results to display on each results page. Default: 20.
Length of Excerpt to Display
This is the number of words to be included in the excerpt that appears with each result on the search results page. Default: 50.
Max. Occurrences of a Term to Count
This number indicates the maximum number of times that a word or phrase will be counted in a single item (article, static page, etc.) The reason for this is that some articles may have a single word occur many times which could cause it to appear above other articles that are actually more relevant.
Default: 5
Show Author Name in Results
You may select whether to include the item author's name in the search results, with or without a link to the author's profile page. Default: Yes, with Link
Select Stemmer (Experimental)
The only selection (other than “None”) is the Porter English stemmer. The stemmer strips words down to their roots to disregard plurals and other common word endings. For example, “thinking” becomes “think” which would return a result for search terms including “thinks.”
This method reduces the index size and tends to return better results, but be aware that the actual search term entered may not appear on the results page.
Default: None
Ignore Auto Tags?
Autotags are never processed before indexing or searching. This setting goes further and actually strips autotags from the content to avoid including captions and other text that is part of the autotag. Default: No
Replace Stock glFusion Search?
Select “Yes” to have the Searcher plugin handle searches in place of the standard glFusion search function. By leaving this setting at “No” during indexing and testing you can avoid impacting your site guests until you are satisfied that the Searcher plugin is working properly.

If this is set to “No” you can access the Searcher's search form at {your_site}/searcher/. Default: No


Different weights can be assigned to words that appear in different fields. For example, you might want to give a higher weight, or priority, to search terms that appear in the title than in the content or author name.

Higher weights will cause the articles to float higher in the search results.

Defaults: Title: 1.5 Author: 1.2 Content: 1

Development Info

glfusion/plugins/searcher/start.txt · Last modified: 2017/10/04 06:19 (external edit)

Page Tools