Some fixes to whoosh indexing script.