newSlowDistanceQuery

fun newSlowDistanceQuery(field: String?, x: Float, y: Float, radius: Float): 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 XYPointField.newDistanceQuery.

Return

query matching points within this distance

Parameters

field

field name. must not be null.

x

x at the center.

y

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

radius

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

Throws

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