开发者

How do i search for words in my text column? mysql?

I have a column in my table which is of type text. The user may type any combination of words , it should appear in the result. Eg. Suppose string is :- Addicted to stackoverflow

And suppose user types addicted and stackoverflow, then also results should appear. In other words, it is not a simple like operator through which we can get res开发者_开发问答ults. Other option is to use Full Text Search. But my table is InnoDb and not MyISAM, so I can't use even Full Text Search. I will have to make a temporary table each time some user searches for a string. This is terribly inefficient.

Can anybody tell me any other approach that may work out for me? If anybody has their own algorithm then also please share it. I will better go with that rather than creating temporary tables and dropping them each time some search is made.

Thanks in advance :)


You may try Lucene


Check out http://www.sphinxsearch.com/ or http://lucene.apache.org/ or MySQL's RLIKE function


Sphinxsearch actually supports InnoDB, as well as MyISAM.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜