With complete code to scan all docs in the path and index them