KeyError on delete_document
I have a site which uses django haystack+whoosh. And a following problem: I have a cron job which updates whoosh index by update_index command from django-haystack. It is OK when run for the first and second time but when update_index is executed once again I always see this error in my logs:
File "/.../Whoosh-1.5.0-py2.6.egg/whoosh/filedb/fileindex.py", line 445, in delete_document % (docnum, self.name))
KeyError: "Document 1 in segment '_MAIN_1' is already deleted"
Help is much appreciated. I know this is caused by django-haystack but last error comes from whoosh and that's why I have decided to post this issue here.