newSlowDistanceQuery

fun newSlowDistanceQuery(field: String?, latitude: Double, longitude: Double, radiusMeters: Double): Query

Create a query for matching points within the specified distance of the supplied location. This query is usually slow as it does not use an index structure and needs to verify documents one-by-one in order to know whether they match. It is best used wrapped in an [ ] alongside a LatLonPoint.newDistanceQuery.

Return

query matching points within this distance

Parameters

field

field name. must not be null.

latitude

latitude at the center: must be within standard +/-90 coordinate bounds.

longitude

longitude at the center: must be within standard +/-180 coordinate bounds.

radiusMeters

maximum distance from the center in meters: must be non-negative and finite.

Throws

if field is null, location has invalid coordinates, or radius is invalid.