sql - Full text search with php -
i not results following query:
"select * test2 match(txt) against('hello' in boolean mode)"
while test2 looks like:
id | txt 1 | ... 2 | ... 3 | ... 4 | ... .. | ...
txt 30 characters long (text) , fulltext. have 16 records (tiny db) , word hello placed in every record in txt along other words. wanted know how full-text search works. 0 results , can't understand why.
there 2 reasons not getting results:
reason 1: search word 'hello' occurs in many rows.
a natural language search interprets search string phrase in natural human language (a phrase in free text). there no special operators. stopword list applies. in addition, words present in 50% or more of rows considered common , not match. full-text searches natural language searches if no modifier given.
source: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
reason 2: search word 'hello' on stop-word list. word on stopword list never match!
source: http://dev.mysql.com/doc/refman/5.1/en/fulltext-stopwords.html
Comments
Post a Comment