Your SlideShare is downloading. ×
Building a Better Search: Development of a WordPress Search API
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Building a Better Search: Development of a WordPress Search API

3,479

Published on

A copy of the slides being shown the conference session "Building a Better Search: Development of a WordPress Search API" during WordCamp NYC 2009.

A copy of the slides being shown the conference session "Building a Better Search: Development of a WordPress Search API" during WordCamp NYC 2009.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,479
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Introduction Building a Better Search: Development of a WordPress Search API Justin Shreve
  • 2. A Google Summer of Code Project
    • Students worked with mentors (WordPress staff and community members) to develop and improve open source software
    • Annual program (held from May to August)
    • Phases:
      • Community bonding time
      • Interim period (development)
      • Mid-term evaluations
      • Interim Period (Write tests, documentation)
      • Final evaluations
  • 3. WordPress Community Interaction
    • Mentor - Andy Skelton
      • http://andyskelton.com/
    • User/Community Feedback
      • Forums
      • Issue Tracker
      • Development Chats
  • 4. Blogging to Improve the Project
    • Summer of WordPress Development Blog
      • http://gsoc2009wp.wordpress.com/
        • Weekly blog posts
        • Progress reports and upcoming developments
        • Invited comment and conversation
    ( http://gsoc2009wp.wordpress.com/author/justin/ ) “ In response to last night’s dev chat and a follow up by John Myrstad I have released a new version. The new release includes the ability to search by post tags and custom taxonomies (through register_taxonomy) as well as some improvements to the code and how the category selector on the advanced search page is showed…… ”
  • 5. Selecting and Planning the Project
    • View WordPress’ ideas list and Google Summer of Code documentation
      • http://codex.wordpress.org/GSoC2009
    • With these ideas in mind assess WordPress’ current limitations
    • Look to the community
      • Look at feedback about WordPress features
      • Focus on useful enhancements
    • Chose to improve search functionality
  • 6. Rationale Behind the Project
    • Limitations of the Current WordPress Search Engine
      • Both the blog and admin elements are very basic
        • Very little admin control
      • Can only search posts and pages
      • Can not easily filter results by multiple metadata selections
        • You can not do the following search: posts in category A with tags B and C; posts with author A and "text string”
      • Does not support modern search capabilities
        • AND, OR
        • Stemming
        • Spell Checking
  • 7. The Solution
    • Build an API to abstract common search functionality
    • Offer a few suggestions for WordPress Search
      • Google plugin
      • Sphinx plugin
    • Ultimately let users and developers choose how they want their content searched (through plugins)
    • These plugins should address current limitations and fix them
  • 8. Demo
  • 9. A Closer Look at the API
    • http://wordpress.org/extend/plugins/search/
    • The API’s Features
      • Ability to drop in a new search plugin
      • Supports a federated search index
      • Offers easy methods for creating advanced search pages and other similar functionality ( e.g., pagination, sorting, and filtering )
      • Makes it easier for plugins to address current limitations
  • 10. A Closer Look at the Search Plugin(s)
    • Bundled Search Plugins
      • Google
        • Uses Google Custom Search to display results on a self-hosted page (Outsources search work to Google).
      • MySQL
        • Improves upon the current MySQL search by adding multiple content searching, multiple metadata selection and MySQL’s BOOLEAN syntax.
      • Sphinx
        • Offers a powerful alternative for those with slightly more access to their server
        • Implements the tools available from the Sphinx open-source full-text engine
          • http://www.sphinxsearch.com/
  • 11. Creating a New Plugin
    • Implement a new Search plugin in a few easy steps
    • Create a WordPress file (e.g.: fulltext.php) with a class of the same name (fulltext_search)
      • Implement a few variables for the API to communicate through
      • List the features of the plugin to implement
        • Will this engine have an advanced search page? Filters? Sorting option? Pagination? Does it need the search index?
      • Implement just two required functions in the class
        • find_results to query the database
        • search() to format the results
      • Add some activation code for the Search API to understand this is a Search Plugin
  • 12. What the Future Holds
    • Look to the community for further suggestions
      • Monitor the issue tracker
      • Monitor discussions from other sites (ThemeHybrid, Twitter, etc)
      • Monitor WordPress Support forums
    • Implement the API in the WordPress core
      • Patch #10667
  • 13. Closing Thank You!

×