# `AshNeo4j.Functions.StDistance`
[🔗](https://github.com/diffo-dev/ash_neo4j/blob/v0.7.0/lib/functions/st_distance.ex#L5)

Geodesic distance between two points, in meters. Mirrors ash_geo /
PostGIS `ST_Distance`. v1 supports point-point only.

    Place
    |> Ash.Query.filter(st_distance(location, ^customer_point) < 5_000)
    |> Ash.read!()

When used inside a comparison filter (`<`, `<=`, `>`, `>=`, `==`), the
whole comparison pushes down to Neo4j's native
`point.distance(p1, p2) <op> threshold` — geodesic haversine in WGS-84,
no Elixir-side math.

Other contexts (`order_by`, `calculate`, comparisons against non-numeric
RHS) fall back to in-memory `evaluate/1` using the same haversine formula.
Pushdown in those contexts is future work.

# `args`

# `has_partial_evaluate?`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
