diff --git a/app/api/nodes/route.ts b/app/api/nodes/route.ts index 48c5d4b..da0202e 100644 --- a/app/api/nodes/route.ts +++ b/app/api/nodes/route.ts @@ -229,7 +229,7 @@ export async function POST(request: NextRequest) { atp_uri: atp_uri, title: title, body: body, // Store the raw text body - coords_3d: [0, 0, 0], // Required by schema - origin coordinates for new nodes + // coords_3d will be calculated when user runs /api/calculate-graph }; // Only include embedding if it was successfully generated diff --git a/db/schema.surql b/db/schema.surql index d2c3691..b05aedd 100644 --- a/db/schema.surql +++ b/db/schema.surql @@ -62,8 +62,9 @@ DEFINE FIELD body ON TABLE node TYPE string; DEFINE FIELD embedding ON TABLE node TYPE array; -- The 3D coordinates calculated by UMAP. -DEFINE FIELD coords_3d ON TABLE node TYPE array - -- Must be a 3-point array [x, y, z] or empty. +-- Nodes start with NONE and get coordinates when user runs calculate-graph. +DEFINE FIELD coords_3d ON TABLE node TYPE option> + -- Must be NONE or a 3-point array [x, y, z]. ASSERT $value = NONE OR array::len($value) = 3; -- Define the vector search index.