由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - MySQL全文搜索的问题
相关主题
why this full-text search doenst work properly?mysql or sqlserver?
mysql索引/优化的一个问题MySQL concat 使用一问
Rookie's question again请问在mysql中search的问题
这“精妙sql语句”是错误的吗how to extract text
想练习SQL, 求建议MySQL的fulltext检索
请教怎么来log duration of a MYSQL procedure?sql面试题1
问个sql的问题吧,搞不出来了. (转载)问一个query
关于in的效率[转载] 有谁试了MySql 4.11中的中文全文搜索功能
相关话题的讨论汇总
话题: mysql话题: 4715432话题: select话题: where话题: rows
进入Database版参与讨论
1 (共1页)
L******r
发帖数: 199
1
在一段文本域中找同时出现的俩单词,发现website上介绍的办法
http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html
#
'+apple +juice'
Find rows that contain both words.
不灵
==============
mysql>SELECT id FROM reviews WHERE MATCH (data) AGAINST ('+apple +juice');
...........
...........
| 4715432 |
+---------+
1400 rows in set (2.22 sec)
mysql> SELECT * FROM reviews WHERE id=4715432;
+---------+--------------------------------+----+
| id | data | N1 |
+---------+--------------------------
B*****g
发帖数: 34098
2
don't know much about mysql.
but when I do oracle/.net/others, if I copy the code from reliable source
not work in my environment, the first thing I do is check the version diff.
For your case, make sure you use mysql 5.0


【在 L******r 的大作中提到】
: 在一段文本域中找同时出现的俩单词,发现website上介绍的办法
: http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html
: #
: '+apple +juice'
: Find rows that contain both words.
: 不灵
: ==============
: mysql>SELECT id FROM reviews WHERE MATCH (data) AGAINST ('+apple +juice');
: ...........
: ...........

a*******s
发帖数: 324
3
It seems fulltext index introduced in MySQL 5.0 and can only be used for
myisam type table.
At least, you should add the fulltext index when you create the table.

【在 L******r 的大作中提到】
: 在一段文本域中找同时出现的俩单词,发现website上介绍的办法
: http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html
: #
: '+apple +juice'
: Find rows that contain both words.
: 不灵
: ==============
: mysql>SELECT id FROM reviews WHERE MATCH (data) AGAINST ('+apple +juice');
: ...........
: ...........

1 (共1页)
进入Database版参与讨论
相关主题
[转载] 有谁试了MySql 4.11中的中文全文搜索功能想练习SQL, 求建议
MySQL Question请教怎么来log duration of a MYSQL procedure?
mysql challenge问个sql的问题吧,搞不出来了. (转载)
Where to download free MySQL book关于in的效率
why this full-text search doenst work properly?mysql or sqlserver?
mysql索引/优化的一个问题MySQL concat 使用一问
Rookie's question again请问在mysql中search的问题
这“精妙sql语句”是错误的吗how to extract text
相关话题的讨论汇总
话题: mysql话题: 4715432话题: select话题: where话题: rows