A new universe for your graph data.Meet Galactus DB
GALACTUS DB WIKIDeployment · Queries · Operations

Spatial indexes

Wiki / Indexes and constraints

On this page

Point (spatial) index

A uniform-grid index over a Point property for bounded-distance and nearest queries.

Declare

CREATE POINT INDEX placeIdx FOR (n:Place) ON (n.loc);
SHOW POINT INDEXES;

Query

// everything within 5 km of a point, nearest first (metres for geographic SRIDs):
CALL db.index.geo.withinDistance('placeIdx', point({longitude: -0.12, latitude: 51.5}), 5000)
YIELD node, distance
RETURN node.name, distance ORDER BY distance;

// the 3 nearest places:
CALL db.index.geo.nearest('placeIdx', point({longitude: -0.12, latitude: 51.5}), 3)
YIELD node, distance
RETURN node.name, distance;

Removing the index

After querying, DROP POINT INDEX placeIdx removes the index; point properties remain.

Shape index

Updated 20 September 2026. WKB-backed geometry/geography properties use their own named spatial indexes:

CREATE SPATIAL INDEX regionShapes FOR (r:Region) ON (r.shape);
CALL db.index.spatial.intersects('regionShapes', spatial.fromWKT('POINT(2 2)'))
YIELD node
RETURN node.name;

This selects envelope candidates and then tests actual shape intersection. Domain, SRID and coordinate layout must match. Nonspatial properties are not indexed; empty shapes do not match. Legacy point() uses the POINT index above.

Cartesian envelopes narrow the search. Geography currently uses conservative whole-world envelopes and refines a scan. WHERE spatial.intersects(...) does not automatically choose this index; request it through the procedure.

SHOW SPATIAL INDEXES lists declarations and DROP SPATIAL INDEX regionShapes removes one. Declarations persist across restarts and backfill existing data. Property/label changes, node deletion and transaction rollback update entries. Index DDL is autocommit-only. See geometry and geography for valid inputs, storage upgrades and computational limits.

EXPLAIN and PROFILE · Resident and hybrid storage · Schema and maintenance procedures

Planning a deployment? Review compatibility and licence setup for your instance.