Merge pull request #2 from ArthurClemens/master

add option to clear the index
Use record param