CINXE.COM
MySQL :: MySQL 5.1 Reference Manual :: 12.9.2 Boolean Full-Text Searches
<!DOCTYPE html> <html lang="en"> <head><script type="text/javascript" src="https://web-static.archive.org/_static/js/bundle-playback.js?v=7YQSqjSh" charset="utf-8"></script> <script type="text/javascript" src="https://web-static.archive.org/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="https://web-static.archive.org/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("https://web.archive.org/web"); __wm.wombat("http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html","20120504094319","https://web.archive.org/","web","https://web-static.archive.org/_static/", "1336124599"); </script> <link rel="stylesheet" type="text/css" href="https://web-static.archive.org/_static/css/banner-styles.css?v=p7PEIJWi" /> <link rel="stylesheet" type="text/css" href="https://web-static.archive.org/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <meta charset="utf-8"/> <!--[if IE ]> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> <![endif]--> <title>MySQL :: MySQL 5.1 Reference Manual :: 12.9.2 Boolean Full-Text Searches</title> <link rel="stylesheet" media="screen" href="/web/20120504094319cs_/http://dev.mysql.com/common/css/mysql.css?v=20111208"/> <link rel="stylesheet" media="projection" href="/web/20120504094319cs_/http://dev.mysql.com/common/css/mysql.css?v=20111208"/> <link rel="stylesheet" media="print" href="/web/20120504094319cs_/http://dev.mysql.com/common/css/print.css?v=20111208"/> <link rel="stylesheet" href="/web/20120504094319cs_/http://dev.mysql.com/doc/docs.css"/> <link rel="contents" href="index.html" title="MySQL Manual"/><link rel="start" href="index.html" title="MySQL Manual"/><link rel="prev" href="fulltext-natural-language.html" title="12.9.1 Natural Language Full-Text Searches"/><link rel="next" href="fulltext-query-expansion.html?ff=nopfpls" title="12.9.3 Full-Text Searches with Query Expansion"/><link rel="up" href="fulltext-search.html" title="12.9 Full-Text Search Functions"/> <link rel="shortcut icon" href="/web/20120504094319im_/http://dev.mysql.com/common/themes/sakila/favicon.ico"/> <script src="/web/20120504094319js_/http://dev.mysql.com/common/js/clear_search_text.js"></script> <script> document.write(unescape("%3Cscript src='" + document.location.protocol + "//web.archive.org/web/20120504094319/http://s7.addthis.com/js/250/addthis_widget.js' type='text/javascript'%3E%3C/script%3E")); </script> </head> <body class="doc"> <div id="container"> <!--UdmComment--> <a class="skipToContent" href="#mainContent">Skip navigation links</a> <div id="header"> <div class="left"> <div id="logo"> <a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/" title="MySQL"> <img src="/web/20120504094319im_/http://dev.mysql.com/common/logos/logo-mysql-110x57.png" alt="MySQL" width="110" height="57"/></a> </div> <div id="tagline">The world's most popular open source database</div> </div> <div class="right"> <div id="search_box"> <!-- Start Search --> <form id="searchform" name="searchform" method="get" action="https://web.archive.org/web/20120504094319/http://search.oracle.com/search/search"> <input type="text" id="q" name="q" value="Search" class="swap_value" onfocus="clearSearchText();"/> <input type="hidden" id="search_dest" name="group" value="Documentation"/> <input type="image" src="/web/20120504094319im_/http://dev.mysql.com/common/themes/sakila/search_g.png" id="go" alt="Search" title="Search"/> </form> </div> <!-- End Search --> <div id="login"> <p><a href="https://web.archive.org/web/20120504094319/https://dev.mysql.com/login/?dest=http%3a%2f%2fdev.mysql.com%2Fdoc%2Frefman%2F5.1%2Fen%2Ffulltext-boolean.html">Login</a> | <a href="https://web.archive.org/web/20120504094319/https://dev.mysql.com/register/">Register</a></p> </div> </div> </div> <!-- MySQL Navigation --> <div id="nav_container"> <div id="flags"> <ul> <li style="position:relative; top:-5px;"> <!-- Icons from http://icondock.com/free/vector-social-media-icons //--> <a href="https://web.archive.org/web/20120504094319/http://www.facebook.com/mysql"><img src="/web/20120504094319im_/http://dev.mysql.com/common/icons/facebook.png" alt="Facebook" title="Join us on Facebook" width="20" height="20"/></a> <a href="https://web.archive.org/web/20120504094319/https://twitter.com/#!/mysql"><img src="/web/20120504094319im_/http://dev.mysql.com/common/icons/twitter.png" alt="Twitter" title="Follow us on Twitter" width="20" height="20"/></a> </li> <br/> </ul> </div> <div id="tab_last"> <ul> <li class="first"><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/">Developer Zone</a></li> <li class="second"><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/downloads/">Downloads</a></li> <li class="current"><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/">Documentation</a></li> </ul> </div> <div id="mysql_menu"> <ul> <li class="current"><a class="current " href="/web/20120504094319/http://dev.mysql.com/doc/">MySQL Server</a> </li> <li class="link"><a href="/web/20120504094319/http://dev.mysql.com/doc/index-enterprise.html">MySQL Enterprise</a> </li> <li class="link"><a href="/web/20120504094319/http://dev.mysql.com/doc/index-gui.html">MySQL Workbench</a> </li> <li class="link"><a href="/web/20120504094319/http://dev.mysql.com/doc/index-cluster.html">MySQL Cluster</a> </li> <li class="link"><a href="/web/20120504094319/http://dev.mysql.com/doc/index-topic.html">Topic Guides</a> </li> <li class="link"><a href="/web/20120504094319/http://dev.mysql.com/doc/index-expert.html">Expert Guides</a> </li> <li class="link"><a href="/web/20120504094319/http://dev.mysql.com/doc/index-other.html">Other Docs</a> </li> <li class="link"><a href="/web/20120504094319/http://dev.mysql.com/doc/index-archive.html">Archives</a> </li> <li class="link last"><a href="/web/20120504094319/http://dev.mysql.com/doc/index-about.html">About</a> </li> </ul> </div> <div id="og_sakila"> </div> <div id="og_title"> </div> </div> <!-- End Navigation Container --> <!--/UdmComment--> <div class="page_container"> <div class="page_sidebar"> <!--UdmCommentTest--> <div id="menu_title"></div> <div id="menu"> <ul> <li class="current"><a class="current subitems" href="/web/20120504094319/http://dev.mysql.com/doc/index.html">Documentation Library</a> <ul class="subitems1"> <li><a href="index.html"><b>Table of Contents</b></a> <ul class="subitems2"> <li> <a href="/web/20120504094319/http://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html">MySQL 5.6 Manual</a> </li> <li> <a href="/web/20120504094319/http://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html">MySQL 5.5 Manual</a> </li> <li class="current">MySQL 5.1 Manual </li> <li> <a href="/web/20120504094319/http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html">MySQL 5.0 Manual</a> </li> <li> <a href="/web/20120504094319/http://dev.mysql.com/doc/refman/4.1/en/fulltext-boolean.html">MySQL 3.23/4.0/4.1 Manual</a> </li> </ul> </li> </ul> </li> </ul> <div class="searchmanual"> <form action="https://web.archive.org/web/20120504094319/http://search.oracle.com/search/search" method="get" id="docsearch"> <strong><label for="searchq">Search manual:</label></strong> <br/> <input id="searchq" type="text" name="q" value="" size="14"/> <input id="searchsubmit" type="submit" value="Go"/> <input id="searchgroup" type="hidden" name="group" value="MySQL"/> </form> </div> </div> </div> <!-- Main content --> <div id="page" class="sidebar"> <!--UdmComment--> <div id="docheader"><a href="index.html"> MySQL 5.1 Reference Manual</a> :: <a href="functions.html">12 Functions and Operators</a> :: <a href="fulltext-search.html">12.9 Full-Text Search Functions</a> :: 12.9.2 Boolean Full-Text Searches</div> <script language="javascript"> <!-- function toggle(what){ if(document.getElementById(what).style.display == "none"){ document.getElementById(what).style.display = "block"; }else{ document.getElementById(what).style.display = "none"; } } //--> </script> <noscript></noscript> <div style="float: right; width: 250px; margin: 0px 0px 8px 8px; background: white"> <div style="text-align: right; font-size: 90%; margin-bottom: 4px"> <div style="text-align: left;"><a style="text-decoration: none" href="fulltext-natural-language.html" title="Previous Section">« 12.9.1 Natural Language Full-Text Searches</a></div> <hr size="1" noshade="noshade" align="center" width="40" style="margin: 0px auto 2px auto"/> <a style="text-decoration: none" href="fulltext-query-expansion.html" title="Next Section">12.9.3 Full-Text Searches with Query Expansion »</a> </div> <div style="padding: 4px 0px 0px 4px; border: 2px dotted #ccc; border-right: none;"> <b>Section Navigation</b> <small>[<a href="#" onclick="toggle('sectionnav');" onkeypress="if (event.keyCode == 13) { toggle('sectionnav'); }">Toggle</a>]</small> <ul id="sectionnav"> <li class="p"><a href="fulltext-search.html">12.9 Full-Text Search Functions</a></li><li><a href="fulltext-natural-language.html">12.9.1 Natural Language Full-Text Searches</a></li> <li class="self">12.9.2 Boolean Full-Text Searches</li> <li><a href="fulltext-query-expansion.html">12.9.3 Full-Text Searches with Query Expansion</a></li> <li><a href="fulltext-stopwords.html">12.9.4 Full-Text Stopwords</a></li> <li><a href="fulltext-restrictions.html">12.9.5 Full-Text Restrictions</a></li> <li><a href="fulltext-fine-tuning.html">12.9.6 Fine-Tuning MySQL Full-Text Search</a></li> <li><a href="full-text-adding-collation.html">12.9.7 Adding a Collation for Full-Text Indexing</a></li> </ul> </ul> </div> </div> <!--/UdmComment--> <div class="section" lang="en"> <div class="titlepage"><div><div><h3 class="title"> <a name="fulltext-boolean"></a>12.9.2. Boolean Full-Text Searches</h3></div></div></div> <p> MySQL can perform boolean full-text searches using the <code class="literal">IN BOOLEAN MODE</code> modifier. With this modifier, certain characters have special meaning at the beginning or end of words in the search string. In the following query, the <code class="literal">+</code> and <code class="literal">-</code> operators indicate that a word is required to be present or absent, respectively, for a match to occur. Thus, the query retrieves all the rows that contain the word “<span class="quote">MySQL</span>” but that do <span class="emphasis"><em>not</em></span> contain the word “<span class="quote">YourSQL</span>”: </p> <pre class="programlisting">mysql> <strong class="userinput"><code>SELECT * FROM articles WHERE MATCH (title,body)</code></strong> -> <strong class="userinput"><code>AGAINST ('+MySQL -YourSQL' IN BOOLEAN MODE);</code></strong> +----+-----------------------+-------------------------------------+ | id | title | body | +----+-----------------------+-------------------------------------+ | 1 | MySQL Tutorial | DBMS stands for DataBase ... | | 2 | How To Use MySQL Well | After you went through a ... | | 3 | Optimizing MySQL | In this tutorial we will show ... | | 4 | 1001 MySQL Tricks | 1. Never run mysqld as root. 2. ... | | 6 | MySQL Security | When configured properly, MySQL ... | +----+-----------------------+-------------------------------------+ </pre> <div xmlns="http://www.w3.org/1999/xhtml" class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><div class="admon-title">Note</div><p xmlns=""> In implementing this feature, MySQL uses what is sometimes referred to as <em class="firstterm">implied Boolean logic</em>, in which </p> <div xmlns="" class="itemizedlist"><ul> <li><p> <code class="literal">+</code> stands for <code class="literal">AND</code> </p></li> <li><p> <code class="literal">-</code> stands for <code class="literal">NOT</code> </p></li> <li><p> [<span class="emphasis"><em>no operator</em></span>] implies <code class="literal">OR</code> </p></li> </ul></div></div><p> Boolean full-text searches have these characteristics: </p> <div class="itemizedlist"><ul> <li><p> They do not use the 50% threshold. </p></li> <li><p> They do not automatically sort rows in order of decreasing relevance. You can see this from the preceding query result: The row with the highest relevance is the one that contains “<span class="quote">MySQL</span>” twice, but it is listed last, not first. </p></li> <li><p> They can work even without a <code class="literal">FULLTEXT</code> index, although a search executed in this fashion would be quite slow. </p></li> <li><p> The minimum and maximum word length full-text parameters apply. </p></li> <li><p> The stopword list applies. </p></li> </ul></div> <p> The boolean full-text search capability supports the following operators: </p> <div class="itemizedlist"><ul> <li> <p> <code class="literal">+</code> </p> <p> A leading plus sign indicates that this word <span class="emphasis"><em>must</em></span> be present in each row that is returned. </p> </li> <li> <p> <code class="literal">-</code> </p> <p> A leading minus sign indicates that this word must <span class="emphasis"><em>not</em></span> be present in any of the rows that are returned. </p> <p> Note: The <code class="literal">-</code> operator acts only to exclude rows that are otherwise matched by other search terms. Thus, a boolean-mode search that contains only terms preceded by <code class="literal">-</code> returns an empty result. It does not return “<span class="quote">all rows except those containing any of the excluded terms.</span>” </p> </li> <li> <p> (no operator) </p> <p> By default (when neither <code class="literal">+</code> nor <code class="literal">-</code> is specified) the word is optional, but the rows that contain it are rated higher. This mimics the behavior of <a href="fulltext-search.html#function_match"><code class="literal">MATCH() ... AGAINST()</code></a> without the <code class="literal">IN BOOLEAN MODE</code> modifier. </p> </li> <li> <p> <code class="literal">> <</code> </p> <p> These two operators are used to change a word's contribution to the relevance value that is assigned to a row. The <code class="literal">></code> operator increases the contribution and the <code class="literal"><</code> operator decreases it. See the example following this list. </p> </li> <li> <p> <code class="literal">( )</code> </p> <p> Parentheses group words into subexpressions. Parenthesized groups can be nested. </p> </li> <li> <p> <code class="literal">~</code> </p> <p> A leading tilde acts as a negation operator, causing the word's contribution to the row's relevance to be negative. This is useful for marking “<span class="quote">noise</span>” words. A row containing such a word is rated lower than others, but is not excluded altogether, as it would be with the <code class="literal">-</code> operator. </p> </li> <li> <p> <code class="literal">*</code> </p> <p> The asterisk serves as the truncation (or wildcard) operator. Unlike the other operators, it should be <span class="emphasis"><em>appended</em></span> to the word to be affected. Words match if they begin with the word preceding the <code class="literal">*</code> operator. </p> <p> If a word is specified with the truncation operator, it is not stripped from a boolean query, even if it is too short (as determined from the <a href="server-system-variables.html#sysvar_ft_min_word_len"><code class="literal">ft_min_word_len</code></a> setting) or a stopword. This occurs because the word is not seen as too short or a stopword, but as a prefix that must be present in the document in the form of a word that begins with the prefix. Suppose that <code class="literal">ft_min_word_len=4</code>. Then a search for <code class="literal">'+<em class="replaceable"><code>word</code></em> +the*'</code> will likely return fewer rows than a search for <code class="literal">'+<em class="replaceable"><code>word</code></em> +the'</code>: </p> <div class="itemizedlist"><ul> <li><p> The former query remains as is and requires both <em class="replaceable"><code>word</code></em> and <code class="literal">the*</code> (a word starting with <code class="literal">the</code>) to be present in the document. </p></li> <li><p> The latter query is transformed to <code class="literal">+<em class="replaceable"><code>word</code></em></code> (requiring only <em class="replaceable"><code>word</code></em> to be present). <code class="literal">the</code> is both too short and a stopword, and either condition is enough to cause it to be ignored. </p></li> </ul></div> </li> <li> <p> <code class="literal">"</code> </p> <p> A phrase that is enclosed within double quote (“<span class="quote"><code class="literal">"</code></span>”) characters matches only rows that contain the phrase <span class="emphasis"><em>literally, as it was typed</em></span>. The full-text engine splits the phrase into words and performs a search in the <code class="literal">FULLTEXT</code> index for the words. Nonword characters need not be matched exactly: Phrase searching requires only that matches contain exactly the same words as the phrase and in the same order. For example, <code class="literal">"test phrase"</code> matches <code class="literal">"test, phrase"</code>. </p> <p> If the phrase contains no words that are in the index, the result is empty. For example, if all words are either stopwords or shorter than the minimum length of indexed words, the result is empty. </p> </li> </ul></div> <p> The following examples demonstrate some search strings that use boolean full-text operators: </p> <div class="itemizedlist"><ul> <li> <p> <code class="literal">'apple banana'</code> </p> <p> Find rows that contain at least one of the two words. </p> </li> <li> <p> <code class="literal">'+apple +juice'</code> </p> <p> Find rows that contain both words. </p> </li> <li> <p> <code class="literal">'+apple macintosh'</code> </p> <p> Find rows that contain the word “<span class="quote">apple</span>”, but rank rows higher if they also contain “<span class="quote">macintosh</span>”. </p> </li> <li> <p> <code class="literal">'+apple -macintosh'</code> </p> <p> Find rows that contain the word “<span class="quote">apple</span>” but not “<span class="quote">macintosh</span>”. </p> </li> <li> <p> <code class="literal">'+apple ~macintosh'</code> </p> <p> Find rows that contain the word “<span class="quote">apple</span>”, but if the row also contains the word “<span class="quote">macintosh</span>”, rate it lower than if row does not. This is “<span class="quote">softer</span>” than a search for <code class="literal">'+apple -macintosh'</code>, for which the presence of “<span class="quote">macintosh</span>” causes the row not to be returned at all. </p> </li> <li> <p> <code class="literal">'+apple +(>turnover <strudel)'</code> </p> <p> Find rows that contain the words “<span class="quote">apple</span>” and “<span class="quote">turnover</span>”, or “<span class="quote">apple</span>” and “<span class="quote">strudel</span>” (in any order), but rank “<span class="quote">apple turnover</span>” higher than “<span class="quote">apple strudel</span>”. </p> </li> <li> <p> <code class="literal">'apple*'</code> </p> <p> Find rows that contain words such as “<span class="quote">apple</span>”, “<span class="quote">apples</span>”, “<span class="quote">applesauce</span>”, or “<span class="quote">applet</span>”. </p> </li> <li> <p> <code class="literal">'"some words"'</code> </p> <p> Find rows that contain the exact phrase “<span class="quote">some words</span>” (for example, rows that contain “<span class="quote">some words of wisdom</span>” but not “<span class="quote">some noise words</span>”). Note that the “<span class="quote"><code class="literal">"</code></span>” characters that enclose the phrase are operator characters that delimit the phrase. They are not the quotation marks that enclose the search string itself. </p> </li> </ul></div> </div><div class="copyright-footer"> Copyright © 1997, 2012, Oracle and/or its affiliates. All rights reserved. <a href="preface.html#legalnotice">Legal Notices</a> </div> <!--UdmComment--><div id="docnav"><a rel="prev" href="fulltext-natural-language.html" title="12.9.1 Natural Language Full-Text Searches">Previous</a> / <a rel="next" href="fulltext-query-expansion.html" title="12.9.3 Full-Text Searches with Query Expansion">Next</a> / <a rel="up" href="fulltext-search.html" title="12.9 Full-Text Search Functions">Up</a> / <a rel="contents" href="index.html">Table of Contents</a></div><!--/UdmComment--><br class="clear"/><!--UdmComment--><div id="comments"><h1>User Comments</h1><table id="c4486" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Jeff Smith on May 27 2004 1:08pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=4486&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=4486">Edit</a>]</td></tr></table><p class="commenttext">Keep in mind that although MATCH() AGAINST() is case-insensitive, it also is basically **accent-insensitive**. In other words, if you do not want _mangé_ to match with _mange_ (this example is in French), you have no choice but to use the BOOLEAN MODE with the double quote operator. This is the only way that MATCH() AGAINST() will make accent-sensitive matches.<br/><br/>E.g.:<br/><br/>SELECT * FROM quotes_table WHERE MATCH (quote) AGAINST ('"mangé"' IN BOOLEAN MODE)<br/><br/>For multiword searches:<br/><br/>SELECT * FROM quotes_table MATCH (quote) AGAINST ('"mangé" "pensé"' IN BOOLEAN MODE)<br/><br/>SELECT * FROM quotes_table MATCH (quote) AGAINST ('+"mangé" +"pensé"' IN BOOLEAN MODE)<br/><br/>Although the double quotes are intended to enable phrase searching, just like any web search engine for example, you can also use them to signify single words where accents and other diacritics matter.<br/><br/>The only drawback to this method seems to be that the asterisk operator is mutually exclusive with the double quote. Or I just haven't been able to combine both effectively.<br/><br/></p><table id="c4950" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Rainer Typke on September 8 2004 7:28pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=4950&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=4950">Edit</a>]</td></tr></table><p class="commenttext">Be careful with the phrase search when short words are involved!<br/>Words that are shorter than the minimum word length (by default, words with up to 3 characters) are sometimes taken into consideration when you search for phrases, but sometimes not!<br/><br/>Example 1:<br/>A search for the phrase "the creation" will find all records that really contain this phrase, and only those. So, a record containing only "la creation du monde", even without the accent aigu on the e in creation, won't be found. This is just fine and what one would expect.<br/><br/>Example 2: A search for the phrase "let it be" won't find any record, not even records containing something like "The Beatles: Let It Be". According to the MySQL team, this is not a bug. <br/>I personally find it very counterintuitive to sometimes take short words into consideration for phrase searches, but only if there is at least one properly long word in the search phrase.<br/></p><table id="c5119" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Markus Loponen on October 13 2004 7:56pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5119&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5119">Edit</a>]</td></tr></table><p class="commenttext">For those of you who interface MySQL with PHP and wonder what the problem is with getting "exact phrases" working properly, here's the way to go.<br/><br/>$query= "SELECT code, category, header, date FROM articles WHERE MATCH (text,header,summary) AGAINST ('" . stripslashes (str_replace ("&quot;", "\"", ($_POST['keywords']))) . "' IN BOOLEAN MODE)";<br/><br/>PHP, or some setups or with some browsers, convert double quotes from POST data to their HTML-equivalents even without being asked to do that. The above will fix the issue. Stripslashes() is optional, I prefer to keep it in to keep things looking clean, though the \" doesn't seem to break the boolean literal search.<br/></p><table id="c5272" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Rob Thorpe on November 14 2004 6:39pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5272&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5272">Edit</a>]</td></tr></table><p class="commenttext">It's also possible to create a prioritized boolean query with the following SQL:<br/><br/>SELECT id, text, MATCH (text) AGAINST ('word1 word2 word3' in boolean mode) <br/>AS score FROM table1<br/>WHERE MATCH (text) AGAINST ('word1 word2 word3' in boolean mode) order by score desc;<br/><br/></p><table id="c5419" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Adam George on December 13 2004 5:32pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5419&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5419">Edit</a>]</td></tr></table><p class="commenttext">According to the last comment by Rob Thorpe it's possible to prioritize the boolean query like so:<br/><br/>SELECT id, text, MATCH (text) AGAINST ('word1 word2 word3' in boolean mode) <br/>AS score FROM table1<br/>WHERE MATCH (text) AGAINST ('word1 word2 word3' in boolean mode) order by score desc;<br/><br/>I tried this and it failed to work, i.e. all the scores turned out to be '1' even though the number of matches differed from record to record.<br/></p><table id="c5421" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Brad Satoris on December 13 2004 9:14pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5421&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5421">Edit</a>]</td></tr></table><p class="commenttext">Boolean searching has two deficiencies: 1) results are not sorted by relevance and; 2) no method by which to weigh certain columns. There is a way around both of these problems. For example, if I have a table of articles and want to weigh the title more heavily than the text, I can do the following:<br/><br/>SELECT *, ( (1.3 * (MATCH(title) AGAINST ('+term +term2' IN BOOLEAN MODE))) + (0.6 * (MATCH(text) AGAINST ('+term +term2' IN BOOLEAN MODE))) ) AS relevance FROM [table_name] WHERE ( MATCH(title,text) AGAINST ('+term +term2' IN BOOLEAN MODE) ) HAVING relevance > 0 ORDER BY relevance DESC;<br/><br/>Here we artificially manipulate the relevancy score to give title more weight by multiplying by the constant 1.3. In the above query, it doesn't seem to matter whether I have 3 fulltext indexes or just one comprising the title and text columns. From my testing, the results appear to be the same.<br/></p><table id="c5514" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Joe Laffey on January 5 2005 4:30pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5514&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5514">Edit</a>]</td></tr></table><p class="commenttext">In response to the note above Posted by Adam George on December 13 2004 7:32pm:<br/><br/>In my tests it would seem that the score returned is an integer equal to the number of words matched. So if you match on 3 words the scores will range from 1 to 3. If you match only on one word, or only one word is matched in any document, then the scores would all be 1.<br/></p><table id="c5776" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Richard on February 23 2005 7:11pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5776&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=5776">Edit</a>]</td></tr></table><p class="commenttext">In response to Joe Laffey and Adam George:<br/>To enhance sorting of the results in boolean mode you can do the following:<br/><br/>SELECT id, text, MATCH (text) AGAINST ('word1 word2 word3')<br/>AS score FROM table1<br/>WHERE MATCH (text) AGAINST ('+word1 +word2 +word3' in boolean mode) order by score desc;<br/><br/>Using the first MATCH() we get the score in non-boolean search mode (more distinctive). The second MATCH() ensures we really get back only the results we want (with all 3 words). If you want to do 'any of the words' search only, it's better to use non-boolean search instead (unless you are using boolean in order to get rid of 50% treshold limit).<br/></p><table id="c6227" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by kim markegard on June 24 2005 6:31pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6227&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6227">Edit</a>]</td></tr></table><p class="commenttext">I'm not sure why MATCH/AGAINST uses a different scoring method when in boolean mode and when it's not. As stated above, if searching 3 terms in boolean mode, the score will be between 1 and 3 (integer). However, if not in boolean mode, the score is a floating point value.<br/><br/>It seems that non-boolean mode returns a "real" relevancy (based on how often each term was found I presume). In boolean mode it only returns how many terms were found. To me, this is not really relevancy. For instance, if searching on 2 terms, one result may have 20 occurrences of each term and another may have only 1 occurrence of each word, yet they will both return "2" as their relevance.<br/></p><table id="c6516" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Ben Allfree on September 1 2005 6:20am</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6516&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6516">Edit</a>]</td></tr></table><p class="commenttext">This seems to work well for ranking relevance in boolean queries:<br/><br/>select products_id,match(products_model) against ('printer' ) as Relevance<br/><br/>from products <br/><br/>where match(products_model) against ('+"printer"' in boolean mode)<br/></p><table id="c6710" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Ferenc Fogarasi on October 19 2005 12:24pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6710&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6710">Edit</a>]</td></tr></table><p class="commenttext">Hi,<br/>if You want to combine the phrase search with the *, simply search for the words separately and apply a having clause.<br/><br/>For example:<br/>If You wish to find `bird cathcing`, `bird cathcer`, `bird cathers`<br/><br/>try this<br/><br/>SELECT column, MATCH( column ) AGAINST ('bird catch' IN BOOLEAN MODE) AS rank<br/>FROM mytable<br/>WHERE MATCH( column ) AGAINST ('bird catch' IN BOOLEAN MODE) > 0<br/>HAVING column LIKE '%bird catch%'<br/>ORDER BY rank DESC<br/><br/>I know the HAVING clause is slow, but it is only allpied to the rows that match the search criteira.<br/><br/>Have'n tested on big tables, but I have a feeling it works just fine.<br/></p><table id="c6821" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Robert Collins on November 8 2005 8:45pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6821&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6821">Edit</a>]</td></tr></table><p class="commenttext">This works for me so I get a score and the benefits of a boolean search. However, it's doing two different fulltext searches so it may slow things down a lot:<br/><br/>SELECT *, MATCH(post_content, post_title) AGAINST('string') AS `score` FROM posts MATCH(post_content, post_title) AGAINST('string' IN BOOLEAN MODE) ORDER BY score DESC LIMIT 10<br/><br/>The boolean mode after the from statement automatically pulls out the 0's and then the Match statement in the SELECT clause allows me to get the relevance score so I can sort by it.<br/></p><table id="c6940" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Martin Halford on December 2 2005 12:09am</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6940&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=6940">Edit</a>]</td></tr></table><p class="commenttext">Following on from Robert's comment, I've been playing around using his technique trying to get 'exact' and 'any word' searches to work. I've been having trouble with plurals, e.g. searching for 'anchor bolts' when the fulltext index includes 'anchors' and 'bolt'. This can be solved with the boolean part of the Match statement by trimming and searching for +anchor* +bolt*, but the non-boolean part of the Match statement for relevance is still a problem returning zeros in some instances. My 'fix' for this is to search for 'anchor anchors bolt bolts' in the non-boolean part (fairly easy to program in php), which seems to solve the problem. Any easier solutions such as like '%anchor%'?<br/></p><table id="c8039" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Justin Laing on October 4 2006 4:50pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=8039&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=8039">Edit</a>]</td></tr></table><p class="commenttext">I needed to be able to take a user search that might have words in it that are less then the min word length and return only results that contained all words.<br/><br/>What I did was break the query up into two sets of words, one set contained all the words that were >= ft_min_word_len, the other set contained all the shorter words. I did a fulltext search on the words that met the fulltext search length requirement and augmented it with an AND clause that used LIKE '%<shortword1>%'. MySQL uses the fulltext index to narrow down the results and then applies the LIKE conditions, so it stays fast.<br/><br/>This way you don't need to change your ft_min_word_len to a smaller number, which will make your indexes bigger.<br/><br/>Here's the regex I used to break things up:<br/>\b(\w{4,})\b<br/>where ft_min_word_len = 4, that will match all words of 4 or more letters.<br/><br/>Example<br/>Search for the string "axle hub nut" will result in:<br/>WHERE MATCH (col) AGAINST ("+axle*" IN BOOLEAN MODE) AND col LIKE '%hub%' AND col LIKE '%nut%'<br/><br/></p><table id="c8502" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Joost on March 30 2007 10:37am</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=8502&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=8502">Edit</a>]</td></tr></table><p class="commenttext">Fulltext boolean mode search returning (relevance):<br/>SELECT MATCH (x) AGAINST ('word1 word2' IN BOOLEAN MODE) AS relevance<br/>The returned relevance is 0,1 or 2. 0 = no match, 1 = one of the words is matched (word1 or word2), 2 = both word are matched.<br/>When using eg. '+word1 word2 word3' it returns a floating point number (double) which is the relevance (all returned rows contain word1, some are more relevant (they return word2 and word3, others less..they contain word1 and (word2 or word3).. others even less..containing only word1 (relevance = 1). <br/></p><table id="c9672" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Lee Clemmer on August 21 2008 12:40am</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=9672&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=9672">Edit</a>]</td></tr></table><p class="commenttext">Markus Loponen, awesome tip about the PHP statement, I was wondering why the quotes didn't seem to do the trick. Thanks for sharing!<br/></p><table id="c9825" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Sean Cannon on November 12 2008 7:24pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=9825&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=9825">Edit</a>]</td></tr></table><p class="commenttext">Here's a query I use to return relevance-based data while still using boolean mode searches, and using weights for different columns, and even weights for specific results:<br/><br/> SELECT id,<br/> store,<br/> name,<br/> (((MATCH(name)<br/> AGAINST(?) * 1.2) +<br/> MATCH(description, keywords)<br/> AGAINST (?) +<br/> ((MATCH(creators)<br/> AGAINST (?) * 1.2)) / 3) +<br/> (((store IN ('xfx','w3d')) * .12) * ((store IN ('iv', '3da', 'vp')) * .1))) *<br/> MATCH(description,keywords,requirements,creators,name)<br/> AGAINST(? IN BOOLEAN MODE)<br/> AS sort_rel<br/> FROM prod_text<br/> WHERE MATCH(description,keywords,requirements,creators,name)<br/> AGAINST(? IN BOOLEAN MODE)<br/> AND store != 'pp'<br/> HAVING sort_rel > 0.2<br/>ORDER BY sort_rel DESC<br/><br/>All placeholders (?s) take the search terms entered by the user in this case.<br/></p><table id="c9827" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Sean Cannon on November 12 2008 7:50pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=9827&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=9827">Edit</a>]</td></tr></table><p class="commenttext">For the record, I also like to use three letter (and smaller) words, but I also understand the need to not index all of them (it would simply be absurd).<br/><br/>Instead of enabling a smaller size, what I do is this:<br/><br/>I preprocess against a list of three letter words I want to be matchable. For any row I find, I insert a different string into the indexed text the same number of times (this column need not actually be the one holding returned text mind you, it can be a duplicate column used only for indexing and searching).<br/><br/>When a user searches, I preprocess his or her search query in the same way, replacing any of the words I want matchable with the longer string.<br/><br/>For instance, if I wanted the search to be able to match 'GUN' I would search (using LIKE) for all rows matching and get back the results into a perlscript:<br/><br/>my $check_for_tlw_q = <<"EOF";<br/>SELECT id, fulltext_indexed<br/> FROM some_table<br/> WHERE fulltext_displayed RLIKE '(^|[[:blank:]])GUN([[:blank:]]|$)'<br/> AND fulltext_indexed NOT RLIKE '(^|[[:blank:]])TLWGUNTLW([[:blank:]]|$)'<br/>EOF<br/>my $check_for_tlw = $dbh->prepare($check_for_tlw_q);<br/><br/>my $update_tlw_q = <<<"EOF";<br/>UPDATE some_table<br/> SET fulltext_indexed = ?<br/> WHERE id = ?<br/>EOF<br/>my $update_tlw = $dbh->prepare($update_tlw_q);<br/><br/>$check_for_tlw->execute;<br/>while (my $row = $check_for_tlw->fetchrow_hashref) {<br/> $row->{fulltext_indexed} =~ s/\bgun\b/TLWGUNTLW/igsm;<br/> $update_tlw->execute($row->{fulltext_indexed}, $row->{id}); <br/>}<br/><br/>Then when a user searches for 'machine gun' the search is substituted to be 'machine TLWGUNTLW' behind the scenes. This has the effect of making 'gun' matchable without enabling words like 'the' and 'and' and 'les' and 'how' and 'brb' and thus not bogging down the index except where necessary.<br/><br/></p><table id="c9979" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by masi pay on February 20 2009 3:16am</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=9979&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=9979">Edit</a>]</td></tr></table><p class="commenttext">Using > < can give some weight but if you have more than two words to match against like match(..) against('>frist second third') and you want to give weight, seems like there is no way. adding '>' will give you the higher weight to 'first' in this case but how to give second and third.. weight is not clear.<br/><br/>This is impportant specially if you have more than two fields to match against, field artist, field album, field producer, you want to list with artist then album then producer.<br/><br/></p><table id="c10416" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Roel Van de Paar on October 13 2009 2:41am</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=10416&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=10416">Edit</a>]</td></tr></table><p class="commenttext">Note that you can use myisam_ftdump utility to dump the fulltext index.<br/></p><table id="c10670" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Andrew Upton on March 10 2010 11:10am</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=10670&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=10670">Edit</a>]</td></tr></table><p class="commenttext">Another possibility for returning results based on relevance is to construct your search table with a score/value already built in. This is not a perfect solution by any means but will certainly return results much quicker with extremely large tables and help to sort the results a little better. <br/><br/>1. Build your search table<br/><br/>CREATE TABLE my_search<br/>(<br/> id int(10),<br/> category smallint(5),<br/> score smallint(5),<br/> text_data text<br/>) <br/>ENGINE=MyISAM <br/>DEFAULT CHARSET=latin1 <br/>ROW_FORMAT=COMPRESSED;<br/><br/>2. Fill the table with data<br/><br/>Fill the search table with data giving a greater score value, to more important data. <br/><br/>For example with a product database:<br/><br/>Insert the product names, make and model into the "text_data" column and give it a score of 5 (or similarly higher score). Insert the product specification and give this a score of 3 (medium value) and then insert the product description and any other related text with a score of 1 (low value).<br/><br/>Therefore, in this example, we insert 3 rows for the three items of data with differing scores relating to the data's importance.<br/><br/>3. Create indexes<br/><br/>CREATE FULLTEXT INDEX idx_1 ON my_search (text_data);<br/>CREATE INDEX idx_2 ON my_search (id);<br/><br/>You may wish to create indexes for the other columns, such as category, if they are included in your proposed SELECT statement.<br/><br/>4. Execute your SELECT<br/><br/>The following Select statement will return your search results sorted with matches against product name towards the top. If the match is against product name *and* specification then this has an even higher score (relevance) and appears higher in the list. <br/><br/>SELECT id, sum(score)<br/>FROM my_search<br/>WHERE MATCH(text_data) AGAINST ('search for this text' IN BOOLEAN MODE)<br/>GROUP BY id<br/>ORDER BY sum(score) DESC;<br/><br/>-- <br/><br/>As I said at the beginning, this is not a perfectly accurate list by *real* computed relevance. However, this may provide help in some circumstances with extremely large databases (mine has 2.2 million rows). <br/><br/></p><table id="c10756" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Richard Shea on May 20 2010 11:28pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=10756&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=10756">Edit</a>]</td></tr></table><p class="commenttext">I found the default settings of the server/database I was working within ...<br/><br/>SHOW VARIABLES LIKE 'collation%'<br/><br/>Variable_name Value<br/>collation_connection utf8_unicode_ci<br/>collation_database latin1_general_cs<br/>collation_server latin1_swedish_ci<br/><br/>... meant the above example did not return both rows but instead only the row which contained the 'database' string. <br/><br/>I was able to resolve this by explicilty setting the character set/collation to one that that is case in-sensitive<br/><br/>CREATE TABLE articles(<br/>id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY ,<br/>title VARCHAR( 200 ) ,<br/>body TEXT,<br/>FULLTEXT (<br/>title,<br/>body<br/>)<br/>) DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;<br/><br/></p><table id="c11788" class="commentdetails" summary="" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>Posted by Roman Partyka on March 18 2011 12:41pm</td><td align="right">[<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=11788&action=delete">Delete</a>] [<a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?id=11788">Edit</a>]</td></tr></table><p class="commenttext">I have noticed strange behavior. I have a table 'mytable' with two columns: id (int), article (text). Column 'article' has FULLTEXT index on it. I want to find articles containing both 'word1' and 'word2'. 'word1' is very common (90% of the articles contain it). <br/><br/>Straightforward query:<br/>SELECT id, article FROM mytable WHERE MATCH(article) AGAINST ('+word1 +word2' IN BOOLEAN MODE)<br/>does return result, but is very slow.<br/><br/>At the same time, another query<br/>SELECT id, article FROM mytable WHERE MATCH(article) AGAINST ('+word1' IN BOOLEAN MODE) AND MATCH(article) AGAINST ('+word2' IN BOOLEAN MODE)<br/>returns the same result, but could be 100 times faster...<br/><br/>This is true for version 4.1<br/><br/></p><p><a href="/web/20120504094319/http://dev.mysql.com/doc/mysql/comment.php?sect=fulltext-boolean">Add your own comment.</a></p></div><!--UdmComment--><div id="docnav"><a href="#">Top</a> / <a rel="prev" href="fulltext-natural-language.html" title="12.9.1 Natural Language Full-Text Searches">Previous</a> / <a rel="next" href="fulltext-query-expansion.html" title="12.9.3 Full-Text Searches with Query Expansion">Next</a> / <a rel="up" href="fulltext-search.html" title="12.9 Full-Text Search Functions">Up</a> / <a rel="contents" href="index.html">Table of Contents</a></div><!--/UdmComment--></div></div> </div> <!--End Container --> </div> </div> <div id="footer"> <div class="links"> <ul> <li class="top"><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/">Developer Zone</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/">Documentation</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/articles/">Developer Articles</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/news-and-events/">News & Events</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://forums.mysql.com/">Forums</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://bugs.mysql.com/">Bugs</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://forge.mysql.com/">Forge</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://planet.mysql.com/">Planet MySQL</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://labs.mysql.com/">Labs</a></li> </ul> </div> <div class="links"> <ul> <li class="top"><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/downloads/">Downloads</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/downloads/mysql/">MySQL Community Server</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/downloads/mysql-proxy/">MySQL Proxy</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/downloads/cluster/">MySQL Cluster</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/downloads/workbench/">MySQL Workbench</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/downloads/connector/">MySQL Connectors</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://downloads.mysql.com/archives.php">Archives</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://downloads.mysql.com/snapshots.php">Snapshots</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/downloads/mirrors.html">Mirrors</a></li> </ul> </div> <div class="links"> <ul> <li class="top"><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/">Documentation</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/">MySQL Reference Manuals</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/index-gui.html">MySQL Workbench</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/index-expert.html">Expert Guides</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/index-topic.html">Topic Guides</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/index-cluster.html">MySQL Cluster</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/index-other.html">Other Documents</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/index-mysqlu.html">MySQL University</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/index-about.html">About</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/doc/index-archive.html">Archives</a></li> </ul> </div> <div class="links"> <ul> <li class="top"><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/support/">Support</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://forge.mysql.com/wiki/Category:MySQLUserGroups">MySQL Meetups</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://lists.mysql.com/">Lists</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://forums.mysql.com/">Forums</a></li> </ul> <ul> <li class="top">Other</li> <li><a href="https://web.archive.org/web/20120504094319/http://www.mysql.com/about/legal/">Legal</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://www.mysql.com/about/contact/">Contact Us</a></li> <li><a href="https://web.archive.org/web/20120504094319/http://dev.mysql.com/sitemap.html">Site Map</a></li> </ul> </div> <div id="search" class="en"> <form id="footer_search" action="https://web.archive.org/web/20120504094319/http://search.oracle.com/search/search" method="get"> <input type="text" id="f_q" name="q" value="" class="swap_value" onfocus="clearSearchText();"/> <input type="hidden" name="group" value="Documentation"/> <input type="image" src="/web/20120504094319im_/http://dev.mysql.com/common/themes/sakila/footer_search_g.png" id="f_go" alt="Search" title="Search"/> </form> </div> </div><!-- End Footer --> <div id="copyright-oracle"><a href="https://web.archive.org/web/20120504094319/http://www.oracle.com/"><img src="/web/20120504094319im_/http://dev.mysql.com/common/logos/logo-oracle-red-91x22.gif" alt="Oracle" width="91" height="22"/></a> <span>© 2012, Oracle Corporation and/or its affiliates</span></div> <script src="/web/20120504094319js_/http://dev.mysql.com/common/js/s_code_remote.js?ver=20091011"></script> </body> </html><!-- FILE ARCHIVED ON 09:43:19 May 04, 2012 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 07:52:40 Feb 18, 2025. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 0.507 exclusion.robots: 0.025 exclusion.robots.policy: 0.015 esindex: 0.009 cdx.remote: 5.499 LoadShardBlock: 178.03 (3) PetaboxLoader3.datanode: 139.785 (4) load_resource: 225.068 PetaboxLoader3.resolve: 117.681 -->