Reputation: 187
I want to use a realtime index as an instantly available delta for today's changes, so it needs to be erased nightly. Is there a nice way to remove all documents from an RT-index? I suppose I could select everything from it and issue a DELETE
for every found id, but that does not seem to be a wise way.
Upvotes: 9
Views: 4606
Reputation: 827
I've tried TRUNCATE RTINDEX ...
without any luck. The easiest method I found was to change the path
configuration of the index. eg:
index myindex
{
type = rt
path = /var/lib/sphinxsearch/data/myindex
...
to
index myindex
{
type = rt
path = /var/lib/sphinxsearch/data/myindex-v2
...
Upvotes: 0
Reputation: 11770
It seems this is not yet possible. http://sphinxsearch.com/forum/view.html?id=6898 deals with this question and the only solution the forum mentions is shutting down Sphinx, clearing out binlog and the relevant files of the index and restart.
Upvotes: 0