Sets the max distance results shall have from the configured origin. If a {@link Metric} was set before the givenvalue will be interpreted as being a value in that metric. E.g.
NearQuery query = near(10.0, 20.0, Metrics.KILOMETERS).maxDistance(150);
Will set the maximum distance to 150 kilometers.
@param maxDistance
@return