private Collector optionallyEnableDistanceCollector(Collector collector, int maxDocs) {
if ( spatialFieldName == null || spatialFieldName.isEmpty() || spatialSearchCenter == null ) {
return collector;
}
distanceCollector = new DistanceCollector( collector, spatialSearchCenter, maxDocs, spatialFieldName );
return distanceCollector;
}