full text indexing - MySQL Match unexpected behavior -
i have database of list of php functions in myisam table columns function_name
, description
indexed using full text
index. i'm getting some.. weird behavior match...against()
query, example:
select * functions match(function_name) against('array_search'); select * functions function_name = 'array_search'
returns expected rows, each query returning 1 row, then:
select * functions match(function_name) against('each'); select * functions function_name = 'each'
the second query returns 1 row, while first query returns nothing @ all.
i've noticed tends happen "common" words in description
column (which should irrelevant), example, same thing happens when searching "while" not "array_pop". however, "count" return expected behavior.
also, rows gets unexpected behavior rows have newly inserted, part (almost newly inserted rows not work, i'm not sure if rows not work newly inserted)
the newly inserted row work bizarre function names like:
select * functions match(function_name) against('asdadasdadasdadasdadasdad')
returns expected behavior. have tried executing like:
alter table functions drop index description; alter table functions drop index function_name; alter table `functions` add fulltext(`function_name`); alter table `functions` add fulltext(`description`); select * functions match(function_name) against('each'); select * functions function_name = 'each';
which still returns 1 row on last query , no rows match() ...against query. i'm not sure math behind match...against query is, know reason might running this?
you running stop words,namely common words ignored.scroll further down myisam,each
in there.you can edit list or use empty file ignore stop words.
Comments
Post a Comment