6👍
✅
I had the same problem just now. Did you try »update_index« instead of »rebuild_index«? That seemed to work for me …
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()
- [Django]-With JS, jQuery, how do I save an AJAX response to a (text) file?
- [Django]-How to copy and change a property of many models from a queryset, in batch?
- [Django]-Django-admin.py makemessages does not create .po files
- [Django]-Django replaces non-ascii characters with \ufffd
Source:stackexchange.com