refactor legacy index insertion into a private method
set cursor starting number only on initial query
check replace documents for dots in keys