Convert distance to string for ElasticSearch