我如何使用类似于mysql的select?
例如,我想匹配category=3
我尝试了什么
SELECT * FROM online WHERE MATCH('hello') and category=3 LIMIT 0,5; SHOW META;
ERROR 1064 (42000): index online: no such filter attribute 'category'
describe online;
+------------+-----------+
| Field | Type |
+------------+-----------+
| id | bigint |
| title | field |
| full_story | field |
| category | field |
| date | timestamp |
+------------+-----------+
没有和类别= 3
SELECT * FROM online WHERE MATCH('test') LIMIT 0,5;
+-------+------+
| id | date |
+-------+------+
| 8190 | 2012 |
| 2865 | 2012 |
| 3843 | 2012 |
| 5362 | 2013 |
| 11201 | 2012 |
+-------+------+
5 rows in set (0.00 sec)
答案 0 :(得分:0)
您需要将类别作为属性而不是字段。
有一个整数属性类型:)