Tested that we can insert document in an index automatically