Convert distance object to string for elasticsearch