0

如何使用类似于 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)
4

1 回答 1

0

您需要将类别作为属性而不是字段。

有一个整数属性类型:)

于 2013-08-26T05:58:35.047 回答