Updated to supported multiple instances of elasticsearch