correct elasticsearch host calculation