Added persistent parameter to use keep-alive connection with elasticsearch