…e set to true, closes #456.
… `single_thread`, closes #455.
The problem was that when "unit" was given, the conversion to miles was happening too early, which caused wrong computations. This change postpones this computation when one really knows which unit should be used.
If an explicit unit is provided with "distance", the "unit" can be safely ignored, as it works as a fallback unit.
The added test files should be equivalent. Actually they hit the same bug as change Two tests for parsing "geo_distance" filter: distance/unit parameters
Those two are supposed to be equivalent: distance: 12, unit: "mi" vs distance: "12", unit: "mi" but they are not because of an underlying bug in the query parsing code, providing non-equivalent behavior whether a number or a string comes via JSON.
… will be easily pluggable)
…y cached, for more strong caching, set `_cache` to true, closes #450.
…efault, remove it, closes #449.