Implement the toggle indexing task