sphinix rt table schema is not updated

55 Views Asked by At

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?

1

There are 1 best solutions below

0
barryhunter On

Just redefining the schema is not enough, as the index files will already exist.

That been said if you delete the index files, while searchd is shut down, the index will be regenerated empty, next time try to use it.