Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>How can I modify MySQL to accommodate this?</p> </blockquote> <p>You'll have to change MySQL's idea of what a word is.</p> <p>Firstly, the default minimum word length is 4. This means that no search term containing only words of &lt;4 letters will ever match, whether that's ‘C++’ or ‘cpp’. You can configure this using the <a href="http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_ft_min_word_len" rel="noreferrer">ft_min_word_len</a> config option, eg. in your my.cfg:</p> <pre><code>[mysqld] ft_min_word_len=3 </code></pre> <p>(Then stop/start MySQLd and rebuild fulltext indices.)</p> <p>Secondly, ‘+’ is not considered a letter by MySQL. You can make it a letter, but then that means you won't be able to search for the word ‘fish’ in the string ‘fish+chips’, so some care is required. And it's not trivial: it requires recompiling MySQL or hacking an existing character set. See the section beginning “If you want to change the set of characters that are considered word characters...” in <a href="http://dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html" rel="noreferrer">section 11.8.6</a> of the doc.</p> <blockquote> <p>escape the + character during the process of entering my data as something like "__plus" and then modifying my search to accomodate</p> </blockquote> <p>Yes, something like that is a common solution: you can keep your ‘real’ data (without the escaping) in a primary, definitive table — usually using InnoDB for ACID compliance. Then an auxiliary MyISAM table can be added, containing only the mangled words for fulltext search bait. You can also do a limited form of stemming using this approach.</p> <p>Another possibility is to detect searches that MySQL can't do, such as those with only short words, or unusual characters, and fall back to a simple-but-slow LIKE or REGEXP search for those searches only. In this case you will probably also want to remove the stoplist by setting <a href="http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_ft_stopword_file" rel="noreferrer">ft_stopword_file</a> to an empty string, since it's not practical to pick up everything in that as special too.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload