draft implementation of doc reindexing