newDistanceFeatureQuery
fun newDistanceFeatureQuery(field: String, weight: Float, originLat: Double, originLon: Double, pivotDistanceMeters: Double): Query
Given a field that indexes point values into a LatLonPoint and doc values into [ ], this returns a query that scores documents based on their haversine distance in meters to (originLat, originLon): score = weight * pivotDistanceMeters / (pivotDistanceMeters + distance), ie. score is in the [0, weight] range, is equal to weight when the document's value is equal to (originLat, originLon) and is equal to weight/2 when the document's value is distant of pivotDistanceMeters from (originLat, originLon). In case of multi-valued fields, only the closest point to (originLat, originLon) will be considered. This query is typically useful to boost results based on distance by adding this query to a clause of a BooleanQuery.