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?

  2. Hello,

    When I come from the search engine on one of page on my site there is an inscription:

    Warning: preg_match () [function.preg-match]: Unknown modifier ‘) ‘ in /home/*****/public_html/******.com/wp-content/plugins/search-unleashed/models/highlighter.php on line 48

    Tell me please how to solve this problem?

    Best Regards, Konstantin.

  3. I discovered a bug in your plugin. Every time someone looks for a word that contains a slash “/”, the plugin breaks the page and the following error gets logged:

    preg_match() [function.preg-match]: Unknown modifier ‘4’ in /wp-content/plugins/search-unleashed/models/highlighter.php on line 53

    To fix the problem, simply insert “$word = preg_quote($word, ‘/’);” right above the preg_match statement in file “highlighter.php”, line 48. What it does, is it escapes the forward slash character and prevents the program from being able to execute preg_match.

    Hopefully this will be fixed in the next release.

    Thank you!

  4. Very nice plugin.

    When used together with Justin Tadlock’s, Query Posts, there are some errors shown in the widgets generated by Query Posts.


    Warning: Invalid argument supplied for foreach() in /var/www/domain.com/public_html/wp-content/plugins/search-unleashed/engines/default.php on line 119

    Warning: implode() [function.implode]: Invalid arguments passed in /var/www/domain.com/public_html/wp-content/plugins/search-unleashed/engines/default.php on line 143

    Warning: Invalid argument supplied for foreach() in /var/www/domain.com/public_html/wp-content/plugins/search-unleashed/engines/default.php on line 119

    Warning: implode() [function.implode]: Invalid arguments passed in /var/www/domain.com/public_html/wp-content/plugins/search-unleashed/engines/default.php on line 143

  5. Hi,

    Love your plugin but recently just found this error message occurring:

    ———–
    Warning: Invalid argument supplied for foreach() in /home/freshlyn/public_html/themes/wp-content/plugins/search-unleashed/engines/default.php on line 119
    ———–

    I have searched high and low for an answer to the problem but getting nowhere fast.

    Have you come across this problem before and if so, can you point me to the solution?

    Thanks again for the great plugin.

  6. I don’t know what happened. I have installed this summer the plugin on a client’s blog. A few weeks ago, suddendly, the search form I had put on the right sidebar disappeared and I don’t remember how I did to reactivate it. So now I have this blog with the plugin and no way to use it.

    How can I reactivate the sidebar search form (it seems there is no widget installed anymore)?
    Where can I find a step-by-step explanation?

    I supported the script because I liked it and it did the job. Now, however I am with a not working plugin and no idea how to make it work again.

    Please help!

  7. Actually.. I got here looking for a way to include the links table in search.. but this plugin doesn’t search the links table does it?

  8. I have always been Search Unleashed fan. I’d be very happy if you can also give a few styles to the search widget itself. It is just plain simple like one in WP.

  9. As detailed on the WordPress Support forum for this plugin [found here: http://wordpress.org/support/topic/295253 there seems to be a major problem with the plugin ‘timing out’ on the search results page. I had this problem months ago but have recently installed the plugin again on a fresh install of WordPress [latest version 2.9] and am experiencing the same problem again:

    Fatal error: Maximum execution time of 30 seconds exceeded in /home/—-/public_html/wp-includes/plugin.php on line 302

    No matter what options I set or change, the same error is shown on the search results page.

    If I then have a look at the search index in the admin area, it tells me there have been over 700 searches when I have only made 1!

    A couple of other people have reported the same error on their own blogs, any thoughts as to why this is happening?

    Thanks, Gemma

  10. I’m having the same problem as Gemma. I’ve searched for several days through the forums here and on wordpress and can’t find an answer.

    It only seems to happen with certain words. For instance, on my site, I can search word “babies” or “fitness” and have no problems. But every time I search the word cupcakes, I get the fatal error timed out.

    Any ideas?

  11. Thanks a lot for this plugin, I use it at my site and it rocks!!

    The read me and tutorials that are included are realy helpfull.
    This is by far the best search plugin for wordpress. And believe me I tried many search plugins.

    I guess if you are getting errors check your file permissions via filezilla or maybe you have a plugin conflict.

  12. Strange thing, the search results are showing draft posts.

    My settings:

    Search Engine: Indexed WordPress
    Include: Only pages and posts

    Why the draft posts are appearing?

    I’m using version 1.0.6.

    Thanks

  13. Found the solution! Yo may remove my question.

    You’ll get a payment next days.

    Bests

    Robert

  14. Hello, I have installed the plugin and now I am using it. It is great. When I go to the plugin settings, and check the log, I see that most of the searches has referrer Google. What does that mean?

    • Well… I deactivated and reactived the plugin and then I performed a re-index.. and now it works.

  15. Hi-

    I’ve installed the plugin everything seems to work fine except for the reindex button.

    I am using wp 3.0 and have tried it with all major browsers (IE, Firefox, Chrome) and ideas?

    Thanks

  16. Hi! Just to say Thanks for your great work on this plugin. You should add to FAQ a better explanation of the Priority in MySQL/Lucene Databases.

    Everything worked fine!!

  17. Search Unleashed seems to be case sensitive. Is there a way to make it case insensitive? Thanks, The plugin is very nice and killed two birds with one stone. Search improvement and landing pages!

  18. Great plugin. I noticed that by default the plugin seems to index posts with a status “auto-draft” . I’m not sure if the auto-draft feature is something new to wp3.0, but I added the following line to spider.php to resolve the issue: $this->post_sql .= ” AND {$wpdb->posts}.post_status!=’auto-draft'”; . Thanks for the plugin.

  19. Changing existing articles in WP 3.0 is impossible due to a fatal error.

    Fix:

    In /engines/default.php Line 118 change

    if ( isset( $modules[‘search_post_excerpt’] ) ) {

    to

    if ( isset( $modules[‘search_post_excerpt’] ) && is_array($this->terms) ) {

    and in /models/spider.php Line 20 change

    include dirname( __FILE__ ).’/search-module.php';

    to

    include_once dirname( __FILE__ ).’/search-module.php';

  20. I am about to install Search Unleashed the first time for one of our partners. I translated the plugin to hu_HU, but I do not know how to send it to the plugin writer, so the translation might be included in future plugin updates / releases.

    Could someone help me to send the translation?

    Thank you in advance.

  21. Brillant – having looked at the code within “search-everything” and recognised it didn’t support full-text searches nor ordering by relevence, I was JUST about to begin designing my own WordPress search plugin.

    Thank goodness I searched Google one more time using a very particular phrase.

    Installed, indexed, worked.

    Very intelligent design – simple – and obvious – and it works.

    I’ve just sent you some money – I’m THAT pleased :D

    Dean Richardson

  22. Hi – would it be possible to add support for custom types? – i have 2 custom types on the site that need indexing? – is there a hack you could suggest? amazing plugin otherwise?

    • i was able to include custom post types in the search by editing
      this file: /models/spider.php right after this line (line 83):
      $this->blog_url = get_option( 'home' ); add a line
      for each post type that looks like this: $this->post_sql
      .= " OR {$wpdb->posts}.post_type='customname1'";
      $this->post_sql .= " OR
      {$wpdb->posts}.post_type='customname2'";
      hope that helps!

  23. is there anyway to show the last 50 search terms and those go get stored on static page of my blog in the footer area is there something like a code i could paste there ? and those to be indexed by google and when the user comes still if he doesn’t find what he searched for to get the nearest results in a page?

    • I don’t think that would be a good idea – it would be easy for someone to add inappropriate words onto your site.

  24. Hi,

    I installed search unleashed, and now it spiders successfully some thrid party plugins I have installed. Thats great !

    On the other hand I does not find anything in some simple plugins i wrote myself.

    If i make a plugin like:

    Hello World

    <?php
    }

    add_shortcode('helloworld', 'showContent');

    And call it with a shortcode:

    [helloworld]

    It won't find the string 'hello'

    Has anyone an Idea ?

  25. Great plugin, I shall be using it on my site.

    Is it possible to index and search data in a DB table that contains data (such as a list of books/reviews) that does not appear as a page.

    I guess this comes under the heading of custom modules.

    Ian
    @bookmeme

  26. Hello, is there anyway to return some special result for some pre-selected keyword. Like, if someone search for “wordpress”, I want to show 3 sticky post from “wordpress” category and then search result. Is it possible?

  27. My blog has about 70,000 posts, and I install this plugin. I choose “Lucense” or even “MySQL” but when I click Re-index it runs about 2% then the message pop up “There is an error”. Can you help me to fix it?

    Thank you.

  28. Great plugin, this really is the best solution for WordPress search.

    My question is can an auto-complete option be included while the visitor is typing his search, as most search engines have?

  29. Nice plugin, congratulations. Does it can do seach over the Midia text contents, like Description, Title, Legend?? Seems to me that it is able just to seach Posts and Pages, am I right or my dream could came true?

Pings

spontis.de | photogabble.co.uk | leechon.com | hombertho.de | blogosfera.sk | zarim.net | vocidalweb.it | mizine.de | dquinn.net | kevinleary.net | photoblogic.com | bradt.ca | leeawan.cn