Communication with elasticsearch