Introduce new method deleteDocumentsByTypeAndIds to avoid duplicate code
in deleting multiple documents of one type