sphinix rt表模式未更新



使用sphinxsearch 2.2,我在sphinx.conf中定义了这个模式:

index topic
{
type                    = rt
path                    = /var/lib/sphinxsearch/data/topic
rt_field                = title
rt_field                = description
rt_attr_timestamp       = created_at
}

当我保存,重新安装搜索(唱searchd --stop,然后searchd再次)模式没有反映在sphixQL中:

MySQL [(none)]> desc topic;
+-------------+-----------+
| Field       | Type      |
+-------------+-----------+
| id          | bigint    |
| title       | field     |
| title       | field     |
| description | field     |
| likes       | uint      |
| created_at  | timestamp |
+-------------+-----------+
6 rows in set (0.000 sec)

可以看到,由于某种原因,上面有两个title字段。这不会改变我对sphinx.conf所做的任何更改。

为了更新模式,我也尝试删除所有/var/lib/sphinxsearch/data/topic*文件,但没有任何区别。

怎么了?我该怎么修理它?

仅仅重新定义模式是不够的,因为索引文件已经存在。

也就是说,如果您删除索引文件,而searchd被关闭,索引将重新生成空,下次尝试使用它。

最新更新