[Django]-Django-Haystack/Whoosh – Rebuild Index Error

6👍

I had the same problem just now. Did you try »update_index« instead of »rebuild_index«? That seemed to work for me …

1👍

Installing Whoosh 0.3.18 solved the problem on my side

0👍

If you found this question while attempting to delete an entry from an index, you might need to use an IndexWriter to delete the entry, rather than a FileIndex object; e.g.:

Instead of:

ix = open_dir('index')
ix.delete_by_term('path', u'/a/b/c')
ix.commit()

which throws the error discussed above, you can delete a file by running:

ix = open_dir('index')
writer = ix.writer()
writer.delete_by_term('path', u'/a/b/c')
writer.commit()

Leave a comment