fix elasticsearch script