WordPress Search plugin

My Google Summer of Code 2009 student, Justin Shreve, has done an excellent job creating a new search API for WordPress. We hope this API will be integrated into the WordPress core because it would simplify replacing the core search functionality and encourage developers to create many more options for searching blogs.

Justin’s Search plugin is actually a package of three plugins. The first plugin installs the API that lets other plugins do the searching. The other two plugins use the API to provide search systems that we think will please most users who are dissatisfied with the built-in WordPress search results: MySQL Fulltext and Google Custom Search. (The Google plugin requires a Google account.) For the search-savvy, Justin also wrote a Sphinx-based plugin, Sphinx Search. This last one involves installing additional software on the server.

I’m running the Fulltext plugin on my personal blog so you can try it. Enter a search in the sidebar. On the search results page you can refine your search by specifying whether to search posts, pages, and comments. You can also sort the results by relevance, date, or alphabet. The Advanced Search link leads to a form where you can specify author, categories, tags, and date range.

Self-hosted WordPress users can install Search. (It is not available for WordPress.com… yet.) After activating the main Search plugin you must also activate one of the other plugins: MySQL Fulltext, Google Custom Search, or Sphinx Search. We are anxious to know what you think of it. Justin plans to continue to improve the search system so he will need lots of user feedback.

24 thoughts on “WordPress Search plugin”

  1. I’m running v2.9 rare so that may have something to do with this…

    When I installed it through the Dashboard and activated it immediately following install, it gave a fatal error saying that the google search function could not be called twice. If I make sure that the google plugin is not activated, then it works well with the MySQL plugin. If I try to activate the google search plugin, it gives a graceful message saying that only one search plugin can be activated at the same time.

  2. Where’s the Search API configuration at?
    The search returns [image and caption tags], not images or captions which looks kinda weird.

  3. A small point for the next update;
    Warning: This plugin has not been tested with your current version of WordPress.
    running 2.8.4

    and the plugin url points to wordpress.org

  4. I get a fatal error when I try to activate…something about;

    Cannot redeclare load_search() previously declared in….

    Is this as simple as a conflict with another plugin? Is there somewhere else I should be adding this comment?

  5. I like this work!

    I was not happy at first when I saw there was no settings page, but then everything is sensibly set up, and the Advanced Search box is very useable and sensibly laid out.

    Two quick things I noticed:

    1. In the search results, it autogenerates excerpts even for posts/pages that have manual excerpts. Why not look first if an excerpt already exists?

    2. It cannot be activated in the current trunk because of a fatal error.

    Congrats to both of you!

  6. Sounds real good. I like the integrated google custom search idea. I’m going to give it a try also.

  7. It doesn’t works in my selfhosted wp 2.8.4 blog. The google search shows an ugly error, sphynx search isn’t an option and the only plugin available is the mysql seach an doesn’t does anything 😦

  8. Would it be possible to run this search plugin alongside the core WordPress search function, in a sort of primary/secondary search option scenario?

    For many months, I’ve tried to find a viable method for allowing my readers an image search against NextGen galleries, with thumbnail output a la Google image search.

    Several online discussions exist where code has been posted to hack the core WordPress search and accomplish this. Problem is, since all WordPress searches are output to the same template, you have to output one of three options:

    1) images and text results altogether in one mussy bundle
    2) images only (leaving no way to search posts)
    3) standard WP search results (back where I started)

    What I’d desperately like to see is a search API that can run alongside and concurrent with the core search, and output to its own template. I could use the hacked WP search to return image thumbnails, and use the plugin search for searching my posts and pages.

    Sorry if my question is off the tracks a bit. Sounds like a nice plugin you’ve described, and I may be tempted to try it out.

  9. I tried it and the latest release tells me it defaults to MySQL search, unfortunaly it tries this after Google is activated so the install process is stopped because the plugin crashes. Workaround is first to deactivate the Google search before activating MySQL search by hand.

    Lawrence Rolograaf

  10. Hey. I really like the plugin, but if your MySQL default engine isn’t MyISAM the table won’t install due to the lack of support for fulltext indexing in InnoDB. The way around that is to add ENGINE MYISAM at the tail of the create table call.

  11. Hey All,

    I released an update late last night. It should try to stop some of these problems.

    Also bsherron, I added in the ENGINE MYISAM text at the end of the create table call. Thanks for that.

    – Justin

  12. Search API with MySQL works fine.

    I have a problem with the combination Search Api and “Google Search Plugin”. As result I get a 404 (site not found) error. When I deactivate the plugins, the google-Search (option 2 – with iframes) works fine.

    Does anybody have a suggestion?

    Many greetings from germany and thanks in advance

  13. Fantastic to have another serious alternative to the terrible WP search.

    My primary concern is the lack of customization. I really need to be able to edit the search results page template but it doesn’t seem this plugin allows for that.
    Is that true?
    If so, it would be fabulous to add support for a theme template file like the search.php Search Results file.


  14. Just tested out the new plugin on your personal blog, and realised if I typed in keywords such as ‘masonry’ (which is one of the categories) no results are found. Other than that, really love the concept!

Comments are closed.