Using sphinxsearch 2.2, I have this schema defined in sphinx.conf:
index topic
{
type = rt
path = /var/lib/sphinxsearch/data/topic
rt_field = title
rt_field = description
rt_attr_timestamp = created_at
}
When I save, and reinstall searchd (sing searchd --stop and then searchd again)
The schema is not reflected in the 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)
As you can see, for some reason there are two title fields above. This does not change whatever change I make to sphinx.conf.
In order to update the schema, I have also tried to removed all /var/lib/sphinxsearch/data/topic* files, but it did not make any difference.
What is wrong here? How can I fix it?
Just redefining the schema is not enough, as the index files will already exist.
That been said if you delete the index files, while
searchdis shut down, the index will be regenerated empty, next time try to use it.