registering document ensures index are created.