6

My client insists on a search on multiple columns by any part of a string. So i'm trying to do this:

... MATCH(smth, smth2) AGAINST('*string*' IN BOOLEAN MODE)

Indexing or a fast search is not a requirement so even if MATCH.. AGAINST were to not use an index - it would be OK. But the problem is that the prefixed wildcard does not work - only the one after the word does:

*string* - will match the same as string* and *string does not match anything

Is there a way to resolve this problem with MYSQL? I'm really not going to install any indexing services or anything like that so slow queries will have to do.

I could try using LIKE on multiple columns somehow, but i imagine this would be even slower.

4

1 回答 1

4

Mysql 全文搜索不允许我们在匹配搜索时使用 * 作为前缀。

检查此以供参考:

http://dev.mysql.com/doc/refman/4.1/en/fulltext-boolean.html

于 2014-01-15T11:09:29.233 回答