The SortField
essentially is just going to pass the field name along to the Comparator, and let it handle getting the correct values and doing the comparison. As such, the DistanceFieldComparatorSource
just tosses the field name out anyway. This makes a measure of sense, since that comparator needs to accesses two fields (lat
and lon
in this case) to perform its comparison, rather than just one.
Instead, the DistanceFilter
wraps up the field names the comparator needs to access, as well as some other attendant data.