use log-based comparison when searching

this makes more sense as it is the inverse of distance