Search Unleashed

download

Download: Search Unleashed
Version: 1.0.6
Supports: WordPress 2.9.2 – 3.0
Other: WordPress.org | SVN
Support: This plugin is no longer actively maintained

Search Unleashed extends the standard WordPress search with customisable search engines, including MySQL’s full text and Zend’s Lucene, as well as word highlighting and the ability to search across posts, pages, comments, titles, URLs, and meta-data.

The plugin also ensures that a search is performed against what a web browser sees, not what is contained within the database. For example, a lot of plugins will insert data into posts using shortcodes. Because this data is inserted run-time it is not included in any search results – the data is invisible. Search Unleashed performs searches across all data, including that added by plugins.

Some features of this plugin are:

  • Customisable search engines (default WordPress, indexed WordPress, MySQL fulltext, Zend Lucene)
  • Optional wildcards and logical search operations
  • Optional prioritisation of fields – you decide what is more important
  • Search posts, pages, comments, titles, URLs, tags, and meta-data (all configurable)
  • Search data after it has been processed by plugins, not before
  • Search highlighting of all searches, including titles and comments
  • Search highlighting of incoming searches from external search engines (such as Google)
  • Search results show contextual search information, not just a post excerpt
  • Record search phrases and display in a log
  • Exclude specific posts and pages from results
  • No changes required to your theme
  • No changes made to standard WordPress database tables
  • Advanced search widget (WP 2.8+)

Search Results

Search Unleashed is available in the following languages (included in the plugin):

Installation

Full installation details can be found in How to Install a WordPress Plugin.

How it works

Search Unleashed works by maintaining a search index that includes all processed information from your site. This is unlike the default WordPress search and most other search plugins, which directly use post data. Although maintaining a separate index is initially more work, the benefits are that a search is faster (it is only looking through relevant information) and can be made on data after processing by plugins. This last point is a key feature of Search Unleashed, and an example is given below.

A lot of plugins provide the ability to insert or modify data dynamically. This is typically achieved by inserting special shortcodes into posts. For example, Sniplets is a plugin to insert data into a post:

[sniplet some processed data]

This is fine when displaying the page, but when it comes to searching, the default search only sees the shortcode and not the end result. This means that any dynamically added data is invisible to the search, making the search itself somewhat less useful.

Search Unleashed indexes data after it has been processed by plugins, making all dynamically modified data visible to searches. The index is maintained separately to core WordPress data, so there is no worry of any corruption or incompatibilities caused by future upgrades.

Configuring the plugin

So you’ve installed the plugin, tried a search, and nothing happened. What’s wrong? First you need to configure the plugin. Don’t worry, this stage is painless and only needs be done once.

Configuration of the plugin takes place from the Search Unleashed administration page:

Admin Menu

There are several sub-pages, each accessible from the menu at the top of the page:

Submenu

Modules

Modules determine what data Search Unleashed indexes. For example, you can configure Search Unleashed to index post content, title, and URL.

Modules are enabled or disabled by checking the box on the left:

module enable

Modules can be configured by clicking the edit icon on the right:

edit module

Note that although a priority is provided in each module, only the Lucene and MySQL fulltext search engines use this. Details on prioritisation can be found in the Search Engine section.

The following modules are provided:

  • Post content
  • Post excerpt
  • Post category
  • Post author
  • Post meta-data
  • Post slug (URL)
  • Post title
  • Tags
  • Comment author URL
  • Comment content
  • Comment author

Note that ‘post’ includes pages.

Options

The options page is split into several sections.

General Options

Search options

  • Log expiry – Configure how many days worth of log data to retain. Enter 0 for no expiry, or -1 for no logs
  • Replace category archive – Replace the category archive with a search based on the category name. That is, replace the ‘WordPress’ category archive with search results for ‘WordPress’
  • Replace tag archive – As above, but replaces a tag archive page with search results
Spider Options

Spider options

  • Search Engine – Select which search engine to use (see Search Engines below)
  • Pages to exclude – Post/page IDs that will not be included in search results
  • Categories to exclude – Category IDs where posts in that category will not be include in search results
  • Include – Specify whether to include pages, posts, password-protected posts, private posts, or draft posts
Theme Options

Theme options

  • Force content display – Some themes, such as the ‘default’ theme, do not show any post content when displaying search results. This option tries to force the display of post content so that it can be highlighted.
  • Search results page title – Change the title of the search results page to reflect the search conditions (i.e. includes the search phrase and number of result pages in the page title)
  • Highlight searches – Highlight search results
  • Highlight incoming searches – Incoming searches are from external search pages such as Google. Note that this may interfere with WP Cache and WP Super Cache
  • Theme title position – Modify this if your title is not highlighted correctly
Search Style

Search Style

  • Include highlight CSS – Include the CSS for highlighting search results. Disabling this will require you to use your own CSS
  • Highlight colour – Select CSS colour values for highlighted phrases

Filters

Search Unleashed allows you to perform searches across the results of all plugins. Sometimes you may have a plugin that adds data that you do not want included in your search results. To achieve this you can use the filters page to disable WordPress filters when data is being indexed. This does not affect the plugin at any other time.

The list of filters will vary according to the theme and plugins you have installed:

filters

Note that this is an advanced feature – do not use unless you understand the effects.

Search Engines

A search engine provides search functionality. Search Unleashed has four search engines, each of which has advantages and disadvantages:

  • Default WordPress
  • Indexed WordPress
  • MySQL Fulltext
  • Lucene

A comparison of the engines is shown below:

Needs Indexing Include Plugins Logical Search Prioritization Medium
Default WordPress No DB
Indexed WordPress Yes Yes DB
MySQL Fulltext Yes Yes Yes Yes DB
Lucene Yes Yes Yes Yes File

You should select a search engine that provides features appropriate to your blog. The Lucene engine requires write access to your wp-content/cache directory and is file-based, whereas all other engines work directly from your database. All search engines will allow highlighting of search phrases.

Prioritization allows you to assign more weight to certain modules, which in turn affects the order of results – posts with more weight appear higher in results, posts with less weight appear later.

For example, you may decide that the title and URL should be more important than meta-data. In this instance you could change the priority of the title and URL module to have a higher priority than the standard 1.0. Setting a priority less than 1.0 will give it less weight.

Indexing

Depending on your choice of search engine you may need to index your database. This process runs through all your posts and stores the plugin-processed data in a separate search index. This process only needs to be performed once. Future modifications to posts will be automatically included in the index.

The default WordPress engine requires no indexing.

Indexing consists of visiting the search index page and pressing re-index button. Your database will then be indexed and a progress bar will show the state of this operation.

indexing

Search Log

Search Unleashed can be configured to record a log of searched phrases. This can be viewed from the log sub menu.

Log

Logical Searching

Search Unleashed tries to be as simple as possible for users performing searches and does not present a complicated set of search options. Instead a search is performed across all indexed data, and can be made using a similar syntax to what is used in popular search engines like Google or Yahoo.

Wildcards are supported through a *, but only when ‘full text’ searching is enabled:

head*

This will find all words that start with head.

Words can marked as required or not required using + and -:

+headspace - the word 'headspace' must exist
-headspace - the word 'headspace' must not exist

An exact phrase can be included by wrapping the phrase in quotes:

'exact search phrase'

Logical inclusion also works:

headspace AND plugin = +headspace +plugin

Here both headspace and plugin must exist.

Unlike some other plugins, Search Unleashed allows you to search for words smaller than four characters in length.

Incoming Results Template

Incoming results are highlighted using a default template. It is possible to change this template by performing the following steps:

  1. Create a directory view/search-unleashed inside your theme
  2. Copy the file wp-content/plugins/search-unleashed/view/search-unleashed/incoming_local.php to the newly created directory in your theme
  3. Modify the copied file as appropriate

Note that the template file is separate from the plugin so you can update the plugin without needing to update the template.

Support & Bugs

This plugin is no longer actively maintained

615 Responses to Search Unleashed

  1. Is there a way to make Search Unleashed search through Blogroll Links and Link Categories? Would need a custom results page perhaps. Thoughts?