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.
Asked
Active
Viewed 4,528 times
9

Manse
- 37,765
- 10
- 83
- 108

Johnny Woo
- 187
- 1
- 4
- 10
3 Answers
0
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
...

user697576
- 780
- 1
- 9
- 11
0
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.

chx
- 11,270
- 7
- 55
- 129