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 thoughts on “Search Unleashed”

  1. The incoming results style can be modified by following the instructions above in the section titled ‘Incoming Results Template’.

    Classes are already used for the span elements to control colour. Certain elements will also have an ID which is referred to by the incoming search result box (clicking a search term will jump you to the first occurrence of that term). These IDs should be unique – if they are not then it’s a bug.

  2. […] 高亮搜索关键字, 可以配置所要搜索的数据是来自文章, 页面还是包括留言.插件主页 Post Avatar […]

  3. Is there a way to disable (hide) the ‘Local Search Results’ box permanently (right now there is a hide button). We don’t want it to show up anymore with searches. Thank you for a terrific plugin.

  4. Did you forget to include mention of the hidden text your plugin places in the search results, or did I miss that part in the documentation?

  5. Hi John, thanks for the plugin! Seems great so far… except on one point I’ve noticed.

    If you do a search on my development site (rbwp.rob-barrett.com) for, say, ‘Ahoy’, the search will return the post ‘Changes Ahoy!’. The problem is that I have title images on some of my posts which are given the Post Title as their ALT info, and Search Unleashed is finding and displaying this. I might not be explaining this well, but if you take a look, you’ll see.

    Anyway, basically I was wondering if there’s a way to exclude certain sections, such as encasing them in a tag so that the search ignores it.

    Thanks.

  6. Hi

    I’ve noticed that searches don’t work when using apostrohpe’s – ‘

    They probably break the sql query. Has anyone else had this and is there a way around it?

    Great plugin though

    Thanks

  7. It could have been my unusual CSS, but there was some white-on-white text in my search results pages. I’ll see if I can repeat the results and give you more info offline… thanks!

  8. This text appears as white on ivory crammed into the first search result:

    “This great search was powered by Search Unleashed.
    Help to prevent remove this message by getting the site owner to support this software.”

    Somehow, I think it’s from your plugin. 🙂

  9. Adey, apostrophes are removed from searches and do not break the SQL.

    Rob, if that is happening on your site then it’s a bug in the plugin and doesn’t require any additional markup. Let me look into it

  10. Hi, thanks for response. Is there a down side to allowing people to search words with apostrophes? Searching “Breakfast at Tiffany’s” would fail unless you put “Breakfast at Tiffany” which most people wouldn’t think to do

  11. Hi,

    The plugins works pretty well… I just found something funny which I’m still trying to look for a workaround.

    I have a title that includes “11:11” but when you do a search it returns nothing at all.

    Any ideas?

  12. Really loved the plugin. Thanks.

    I have a similar problem as Moises stated. I have post titles that include apostrophes:
    BASIL’S FLAME BROILED CHICKEN & RIBS

    When I search for basil’s or basil, there are no search results. When I search for bas or basi, there are results. For the time being, I have resorted to the WP standard search function.

    Also, the plugin is not returning results for searches of content that does exist. It may be a competing plugin issue, but I thought I would mention it.

  13. I’m using datafeedr plugin and trying to get Unleashed to index the product pages with no luck. Does Unleashed only index pages from the database?

  14. Hello John, if I turn off Plugin, my searches results shows full post, when I activate it, the post is shown, but it looses all the images, the font styles, its presented as plain text…

    Any solution?

    Sorry my english, I am from Argentina

  15. […] Search Unleashed 增强Wordpress搜索的插件. 支持通配符搜索, 高亮搜索关键字, 可以配置所要搜索的数据是来自文章, 页面还是包括留言.插件主页 […]

  16. Yes, Search Unleashed indexes the WordPress post and comments database tables.

    American, that is how SU works.

    Kevin, you can insert the search box anywhere in your theme – it has nothing to directly to do with SU.

  17. Hi, me again. In a previous comment I wrote “I have pages that display RSS feeds using the PHPBay plugin. When the search results come up, I see the [phpbay] tags instead of any of the feed items. I’m not too worried about the actual RSS items getting indexed (I realize that’s a bit over the top), but I can’t seem to figure out how to skip showing the content or excerpt in those cases (I think the page title would suffice).”

    You responded with “due to the way WordPress works it’s not possible for SU to disable certain plugins”

    But, that’s not what I was asking (I probably didn’t ask it right). I don’t need the plugin disabled during the rebuild. Just some way to have it “skip” over and not index text that looks like phpbay] (or [wordbay] since I switched to that). If all that showed up was the page title, then all would be well.

    Thanks

  18. Wally, you can just display the title in search results by modifying the search.php file in your theme and removing the call to the_content or the_excerpt. As an additional thing I could introduce an ‘ignored words’ list where you can enter certain words ([wordbay] for example) and SU removes these before any indexing. That may do the trick?

  19. I use the english version of the plugin and want to upload to brazilian portuguese version, but I couldn’t find the proper files in the 0.2.24 release. Is there any problems?

    Anyaway, congratulations for the plugin, it is really a great improvement in WordPress’ original search engine.

  20. [Search highlighting of incoming searches from Google, Yahoo, MSN, Altavista, Baidu, and Sogou]

    Does this mean I can integrate SE with Google Search, which I’m currently using on my site? I’d love to be able to keep Google (for Adsense) and add SE’s highlighting and other valuable features.

    Thanks!

  21. Just an FYI, the latest beta of WordPress 2.7 (almost-rc-9997) seems to break the Search Unleashed plugin when editing a post.

    On a unrelated note, it’s a great plugin. Thanks for developing it.

  22. Is there documentation of the logical operations allowed? Is this just equivalent to the MySQL documents?

    When I try, for example, +’Hardpan’ +’Ben Lomond’ with articles that don’t have that combination I get the list of articles that have both. If I put in Hardpan AND ‘Ben Lomond’ I still get the full set. None of that makes sense. I have the “Full text with logical operations” option turned on.

  23. Slobjones, no it means that when someone performs a search on one of those search engines that takes them to your site the words will be highlighted.

    Patrick, in what way is it breaking the plugin?

    Jon, there was, but so many people complained that they couldnt search for 1 or 2 character words that I removed the restriction – seems you can’t please everyone!

    Rich, the search uses MySQL full text searching

  24. Hi there,

    since Alex Rabe updated his plugin NextGen Gallery to version 1.0/1.0.1 the function searchnggallerytags was replaced. Therefore some errors occured while using the module nextgen_gallery. Commenting some lines did the trick – maybe you can take a look at it?

    Thanks a lot,
    and keep up the good work!

    Best regards,
    marcus.

    1. Hi,

      I experience the same problem with the searchnggallerytags.

      Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'searchnggallerytags' was given in /home/hetdigitalehart.nl/www/sneak/wp-includes/plugin.php on line 166

      Do you know what to comment to get this search plugin to work in combination with NGGallery v1.1.0?

      regards
      Joost

  25. John,

    Is there a way to display the results in some kind of “relevance” order?

    I’ve found that sometimes when you search for some stuff I would expect the results ordered completely different.

    For example: If you Search for the word “Blog” I would expect to see a post named “Blog history” before a newer post called “Web 2” that has the word blog on its content.

  26. I have just upgraded to wordpress 2.7 and am getting Warning: Missing argument 2 for mb_strlen() in /usr/home/blog/wp-content/plugins/search-unleashed/search-unleashed.php on line 698. Please advise.

  27. “Help to prevent remove this message by getting the site owner to support this”
    ..this nag was a great disappointment, i wouldnt event bother to download if i knew
    it was a crippled version. Lame.

  28. wplover, it is not a crippled version. If you had the patience to investigate you would have discovered why. Thanks for the support!

    Moises, it is already in relevance order. This just may not be in the exact order that you expect.

  29. hello there. i have a picture gallery-style site that doesn’t have much content in the actual post itself besides the photo, just pictures with lots of tags. i am trying this out hoping that the search would also search the tags associated with each post (since the post itself has little content), but it seems that it does not .though, it does highlight the tags in the results (i think) if by chance my picture file name includes the search term i’m using. seems like searching the wordpress tags could be possible. much thanks for your help in advance.

  30. > Patrick, in what way is it breaking the plugin?

    On WordPress 2.7 if the Search Unleashed plugin (version 0.2.24) is active when I edit a post and the title has more of 30 characters the editor crashes. I’m only able to read the title but the rest of the post is missed. Disabling the plugin all work perfectly. Do you have any suggestion?

  31. I think what Ronaldo is talking about is that when Search Unleashed is installed the plugin the plugin ‘Sutstom Field Template’ brakes. http://wordpressgogo.com/development/custom-field-template.html

    Specifically, as soon as Search Unleashed is activated, once you click on Edit Pages or list the pages somehow the following errors appears:

    Fatal error: Call to undefined function mb_substr() in /app/apache2/htdocs/cms/ccmsdevelopment/ccms/wp-content/plugins/custom-field-template/custom-field-template.php on line 255

    Deactivating Search Unleashed removes the error.

    Amazing Plugin BTW.

  32. Using latest versions of everything. If I just hit search without any search parameters I get odd search results like this:

    Searchterm1″>On searchterm2

    Can the plugin detect empty search strings and return a more appropriate error message please?

  33. Hello John – I love this plugin and have donated in the past. One problem though – I can no longer filter search by category like so:

    blog/politics/?s=search

    Why does such a query no longer work? Is there any solution for this? Thanks

  34. I’m experiencing an odd bug in WP 2.7 and 2.7.1 When I have Search Unleashed activated and a long permalink (35 or 40 characters) when I try to edit the post, I get a big blank screen where the edit window ought to be.

  35. Hi John,

    when I installed this on my live site, at first it worked and now it won’t. IE Searches just bring up a blank page.

    I’ve tried re-indexing but I don’t think that’s working.

    I’ve got it installed on a local desktop as well, and that’s fine. When I re-index I can see the grey timer filling up and then giving me a message to “Finished Click to Return” but I don’t get that on the live site.

    Any ideas?

    Thanks

  36. Absolutely Great plugin! just one question, how can I disable the highlighting of the Search Results Titles? I still want words in the excerpts to be highlighted, just not the Titles of the Results.
    Thanks!

  37. Hello very nice plugin.
    But if i have a post with the title “Post18”,then if i put in the search Post 18,search unleashed searches only for the number 18.Is that a bug?How i can fix this?

  38. Pingback: 骑楼

Comments are closed.