promisified elasticmanager. Fixed bugs in deleteDocument