SunQuest
 
       PHP
  Home arrow PHP arrow Using Relevance Rankings for Full Text...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Using Relevance Rankings for Full Text and Boolean Searches with MySQL
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 6
    2007-06-13

    Table of Contents:
  • Using Relevance Rankings for Full Text and Boolean Searches with MySQL
  • Developing a basic MySQL-driven search engine
  • Determining the 50 percent threshold
  • Building an additional example

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Using Relevance Rankings for Full Text and Boolean Searches with MySQL


    (Page 1 of 4 )

    If you're a web developer who is searching for a step-by-step guide on how to quickly implement full text and Boolean searches with MySQL, then look no further. This group of articles might be what you need. Welcome to the second tutorial of the series that began with "Performing Full Text and Boolean Searches with MySQL."

    Introduction

    As the above title claims, this series shows you the key points for speeding up the execution of traditional SELECT statements by using the powerful capabilities of full text indexes and Boolean operators. These operators are fully supported by the newest versions of the popular open-source MySQL database server.

    Now that you know what this series of educational articles is about, let me provide you with a brief explanation of how full text and Boolean searches work, in case you don't yet have solid background in these helpful features. It's worth keeping in mind that they're not only present in MySQL, but in the majority of production-level database systems, like Oracle and Microsoft SQL Server.

    Basically, the implementation of full text indexes for a specific database table implies the usage of the FULL TEXT MySQL command. This command specifies that one or more fields contained in that table will support this feature. This means that when performing a search query against the specified database table, all the searching terms included in the query that happen to be three or more characters long will be directly discarded from it, in this way performing a process commonly known as "noisy words removal."

    Logically, as you may have guessed, defining these types of indexes for a given MySQL database table helps to improve the performance of large search queries. As an additional benefit, when the indexes in question are used in conjunction with a MATCH SQL statement, the corresponding results return a relevance ranking in accordance with the search terms included into the query.

    Besides, it's very important to mention that full text indexes support the implementation of Boolean operators too, including plus (+) and minus (-) signs, among others. This feature makes it very convenient to specify which search terms should be considered, and which ones should be discarded, when performing a search query against a given database table.

    Of course, discussing the numerous benefits in using full text and Boolean searches with MySQL and only covering the theoretical aspect of the subject is a rather pointless process. Therefore in this second part of the series I'm going to demonstrate with several easy-to-grasp examples how to work with relevance rankings, in this way diving a bit deeper into this exciting database-related terrain.

    Now, let's get rid of the preliminaries and keep learning more about using full-text and Boolean searches in MySQL. It's going to be instructive, trust me!

    More PHP Articles
    More By Alejandro Gervasio


       · Over the course of this final part of the series, you'll learn how to retrieve and...
       · Hello,I was not able to execute the code. I think there should be something...
       · Hi Kelvin,Thank you for commenting on my PHP article. As you requested, here's...
     

       

    PHP ARTICLES

    - Viewing and Editing Tasks for a Project Mana...
    - More on Private Methods with PHP 5 Member Vi...
    - Adding Tasks to a Project Management Applica...
    - Utilizing Private Methods with PHP 5 and Mem...
    - Making Changes in a Project Management Appli...
    - Defining Public and Protected Methods with M...
    - HTML for a Project Management Application
    - Using Subclasses and Accessors with Member V...
    - Implementing Internet Protocols with PHP
    - Project Management: The Application
    - Working with Private Properties to Protect P...
    - Protecting PHP 5 Class Data with Member Visi...
    - Setting Up a Web-based Image Hosting Service
    - Comparing Files and Databases with PHP Bench...
    - Setting Up a Web-Based Image Gallery





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway