Mega Code Archive

 
Categories / MySQL / Fulltext Search
 

Boolean Search Expressions (IN BOOLEAN MODE)

+word               The word must be contained. -word               The word may not appear. ~word               The word should not appear in the record.                      Thus ~word is suited to eliminate "noise words". <word               Gives the word a lesser standing. >word               Gives the word a greater standing. word*               Searches for words that begin with word (e.g., word, words, wordless). "word1 word2"       This exact word order should be searched. Case-insensitive. ()                  Used to group expressions.  A Boolean full-text search might look like this: SELECT * FROM tablename WHERE MATCH(column1, column2) AGAINST('+word1 +word2 -word3' IN BOOLEAN MODE)