SchemaService
Schema management: node label and edge type definitions, and the named constraints declared over them.
A type definition describes an individual record: property types, requiredness, defaults and computed properties. It never declares uniqueness. Uniqueness, node keys and the other constraints are separate named objects, created and dropped through the constraint RPCs, which share one catalog and one admission path with CREATE CONSTRAINT / DROP CONSTRAINT in Cypher: a constraint created here is the same object a query sees, and the reverse.
Proto source
Transport
All methods are available via:
- gRPC on port 7080 — native high-performance API
- REST/JSON on port 7081 — HTTP/JSON transcoding via embedded structured-proxy
Methods
CreateLabel
Create a node label definition. Creating a type never builds an index and never declares a constraint.
HTTP: POST /v2/graph/schema/labels
Request: CreateLabelRequest
| Field | Type | Description |
|---|---|---|
name | string | Label name, for example "User". Case-sensitive. A label that already has a definition is refused. |
properties | PropertyDefinition[] | Stored properties. Names are unique within the request. |
computed_properties | ComputedPropertyDefinition[] | Computed properties. Names are unique and distinct from the stored ones. |
schema_mode | SchemaMode | How the label validates and stores properties. |
temporal | bool | Whether nodes of the label are bitemporal. Cannot be changed later. |
Response: Label
| Field | Type | Description |
|---|---|---|
name | string | Label name. Case-sensitive. |
declared | bool | False for a label stored nodes carry without a definition; every other field is then empty. |
properties | PropertyDefinition[] | Stored properties, by name. |
computed_properties | ComputedPropertyDefinition[] | Computed properties, by name. |
schema_mode | SchemaMode | How the label validates and stores properties. |
temporal | bool | Whether nodes of the label carry a valid-time interval and keep one version per interval start. Fixed when the label is created. |
schema_revision | uint64 | Revision of the definition. Every published change of the definition or of the label's constraints advances it; a published revision never changes. |
ListLabels
List the node labels: every declared label definition, and every label that stored nodes carry without a definition.
HTTP: GET /v2/graph/schema/labels
Request: ListLabelsRequest
Empty request (no fields).
Response: ListLabelsResponse
| Field | Type | Description |
|---|---|---|
labels | Label[] | Every label, ordered by name. |
CreateEdgeType
Create an edge type definition.
HTTP: POST /v2/graph/schema/edge-types
Request: CreateEdgeTypeRequest
| Field | Type | Description |
|---|---|---|
name | string | Edge type name, for example "FOLLOWS". Case-sensitive. An edge type that already has a definition is refused. |
properties | PropertyDefinition[] | Stored properties. Names are unique within the request. |
temporal | bool | Whether edges of the type are temporal. Cannot be changed later. |
discriminator | string | The declared property that, with the endpoints, identifies one edge, so one endpoint pair can hold several edges of the type. It must be a NOT NULL property of type INT64, FLOAT64, BOOL, TIMESTAMP, STRING or BLOB. Empty: at most one edge per endpoint pair, or, for a temporal type, edges identified by their "valid_from". Cannot be changed later. |
Response: EdgeType
| Field | Type | Description |
|---|---|---|
name | string | Edge type name. Case-sensitive. |
declared | bool | False for an edge type stored edges carry without a definition; every other field is then empty. |
properties | PropertyDefinition[] | Stored properties, by name. |
temporal | bool | Whether edges of the type carry a valid-time interval. |
schema_revision | uint64 | Revision of the definition. See Label.schema_revision. |
discriminator | string | The property whose value, with the edge type and the two endpoints, identifies one edge: one endpoint pair holds one edge per value. Empty for a type with at most one edge per endpoint pair. A temporal type that named none at creation is identified by "valid_from". Fixed when the type is created. |
ListEdgeTypes
List the edge types: every declared edge type definition, and every edge type that stored edges carry without a definition.
HTTP: GET /v2/graph/schema/edge-types
Request: ListEdgeTypesRequest
Empty request (no fields).
Response: ListEdgeTypesResponse
| Field | Type | Description |
|---|---|---|
edge_types | EdgeType[] | Every edge type, ordered by name. |
CreateConstraint
Create a named constraint. A uniqueness or node-key constraint provisions the index that enforces it: the constraint is published VALIDATING and enforced on every write from then on, and the build validating it against the stored data is admitted as a server-owned operation. The call waits for that build up to the request's wait. It returns the constraint ACTIVE once the build published it, or VALIDATING with the build when the wait ran out first; the build then goes on without the call. Stored data that breaks the constraint, or a cancellation, within the wait fails the call with nothing left behind.
HTTP: POST /v2/graph/schema/constraints
Request: CreateConstraintRequest
| Field | Type | Description |
|---|---|---|
name | string | Constraint name, unique in the database. Empty: the server derives one and returns it. |
properties | string[] | The constrained properties, in order. NOT_NULL and PROPERTY_TYPE take exactly one; UNIQUE and NODE_KEY take one or more, with no repeats. |
kind | ConstraintKind | What the constraint requires. Required. |
property_type | PropertyType | The required type, for kind PROPERTY_TYPE; must be unset for any other kind. |
if_not_exists | bool | When true, a constraint of the same name, or one requiring the same of the same properties of the same label, already in place makes the call succeed and return that constraint, VALIDATING with its running build included: a retry after a lost reply finds the build the first call admitted rather than admitting a second. When false, either is refused. |
wait | Duration | How long the call waits for the build of the backing index. Unset: the server's default (index_build_statement_wait_secs). Zero: the call returns once the constraint and its build are admitted. Ignored for the kinds checked on each node alone, which have no build. |
on_duplicate_rename | string | UNIQUE and NODE_KEY only: a string property among properties the build may change to end a duplicate it finds in the stored data, by appending a random suffix to one holder's value (ON DUPLICATE RENAME). Each repair commits as its own transaction, is visible at once, and is kept whatever the build's outcome. Empty: the build fails on the first duplicate. Later writes are refused as duplicates as always. |
scope | ConstraintScope | UNIQUE only: the nodes the uniqueness holds among. Unset: every node of the label. Two constraints over the same properties with different scopes are different constraints. |
label | string | The label whose nodes are constrained. |
Response: Constraint
| Field | Type | Description |
|---|---|---|
name | string | Constraint name, unique in the database. |
properties | string[] | The constrained properties, in declaration order; the order is the column order of the supporting index. |
kind | ConstraintKind | What the constraint requires. |
property_type | PropertyType | The required type, for kind PROPERTY_TYPE; unset for every other kind. |
state | ConstraintState | Where the constraint is in its life. |
backing_index | string | Name of the index the constraint owns and is enforced through, for UNIQUE and NODE_KEY; empty for the kinds checked on each node alone. The index is dropped with the constraint and cannot be dropped on its own. |
build | IndexBuild | The build of the backing index, for UNIQUE and NODE_KEY: while the constraint is VALIDATING, the operation deciding whether it becomes ACTIVE. Unset for the kinds checked on each node alone. |
scope | ConstraintScope | For UNIQUE, the nodes the uniqueness holds among: only nodes the predicate admits are compared, and the backing index holds only them. Unset: every node of the label. |
label | string | The nodes whose label is this one. |
DropConstraint
Drop a named constraint, and the index it owns, in one catalog change. The type definition it constrains is left unchanged.
HTTP: DELETE /v2/graph/schema/constraints/{name}
Request: DropConstraintRequest
| Field | Type | Description |
|---|---|---|
name | string | Name of the constraint to drop. |
if_exists | bool | When true, a missing constraint makes the call succeed. When false, it is refused. |
Response: Empty
See common types.
ListConstraints
List the named constraints with their state and supporting index.
HTTP: GET /v2/graph/schema/constraints
Request: ListConstraintsRequest
Empty request (no fields).
Response: ListConstraintsResponse
| Field | Type | Description |
|---|---|---|
constraints | Constraint[] | Every constraint, ordered by name. |
ListIndexBuilds
List the index builds this server knows: every build the catalog records, with its state and progress.
HTTP: GET /v2/graph/schema/index-builds
Request: ListIndexBuildsRequest
Empty request (no fields).
Response: ListIndexBuildsResponse
| Field | Type | Description |
|---|---|---|
builds | IndexBuild[] | Every build, ordered by operation. |
GetIndexBuild
Inspect one index build, after waiting up to the request's wait for its outcome. Waiting, or giving up waiting, cancels nothing. An operation no build has fails with NOT_FOUND.
HTTP: GET /v2/graph/schema/index-builds/{operation}
Request: GetIndexBuildRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The build to inspect. Required: an absent operation is refused, never read as operation 0. |
wait | Duration | How long to wait for the build to reach an outcome before answering. Unset or zero: answer at once. |
Response: IndexBuild
| Field | Type | Description |
|---|---|---|
operation | uint64 | Identity of the build, assigned when it is admitted and never reused. Inspected with GetIndexBuild, cancelled with CancelIndexBuild. |
index | string | Name of the index the build fills. Empty once the index is withdrawn. |
label | string | Label whose nodes the index covers. Empty once the index is withdrawn. |
state | IndexBuildState | Where the build stands. |
phase | IndexBuildPhase | Where a RUNNING build stands on the executor of this server holding it; UNSPECIFIED when none does. |
indexed | uint64 | Nodes indexed so far. Progress, not proof of coverage. |
failure | string | Why the build failed, for FAILED; empty otherwise. |
rename_property | string | The property the build may change to repair a duplicate; empty for a build that fails on the first one. |
repaired | uint64 | Repairs the build has committed so far. Each changed a node's value and is listed by ListIndexBuildRepairs; none is undone by a cancellation or a failure of the build. |
CancelIndexBuild
Cancel an index build. The index it was creating is withdrawn, with the constraint that owns it, in the same catalog change; an index it was rebuilding is kept, failed, and its constraint keeps holding. A build that already has an outcome keeps it: a publication that committed first is never undone. Returns the build as it stands after the call. An operation no build has fails with NOT_FOUND.
HTTP: POST /v2/graph/schema/index-builds/{operation}/cancel
Request: CancelIndexBuildRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The build to cancel. Required: an absent operation is refused, never read as operation 0. |
Response: IndexBuild
| Field | Type | Description |
|---|---|---|
operation | uint64 | Identity of the build, assigned when it is admitted and never reused. Inspected with GetIndexBuild, cancelled with CancelIndexBuild. |
index | string | Name of the index the build fills. Empty once the index is withdrawn. |
label | string | Label whose nodes the index covers. Empty once the index is withdrawn. |
state | IndexBuildState | Where the build stands. |
phase | IndexBuildPhase | Where a RUNNING build stands on the executor of this server holding it; UNSPECIFIED when none does. |
indexed | uint64 | Nodes indexed so far. Progress, not proof of coverage. |
failure | string | Why the build failed, for FAILED; empty otherwise. |
rename_property | string | The property the build may change to repair a duplicate; empty for a build that fails on the first one. |
repaired | uint64 | Repairs the build has committed so far. Each changed a node's value and is listed by ListIndexBuildRepairs; none is undone by a cancellation or a failure of the build. |
ListIndexBuildRepairs
List the duplicates a build with ON DUPLICATE RENAME repaired: the node, the property and the value replaced by which. An operation no build has fails with NOT_FOUND.
HTTP: GET /v2/graph/schema/index-builds/{operation}/repairs
Request: ListIndexBuildRepairsRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The build whose repairs to list. Required: an absent operation is refused, never read as operation 0. |
Response: ListIndexBuildRepairsResponse
| Field | Type | Description |
|---|---|---|
repairs | IndexBuildRepair[] | Every repair the build committed, ordered by node. |
CheckIndex
Start a check of a B-tree index against the records it is derived from, in the background, repairing the entries that disagree. Returns the check as admitted; a check already running for the index's generation is returned as it is. An index that does not exist fails with NOT_FOUND; one that is not a ready B-tree index, or a server that takes no writes (the leader runs checks), with FAILED_PRECONDITION.
HTTP: POST /v2/graph/schema/index-checks
Request: CheckIndexRequest
| Field | Type | Description |
|---|---|---|
index_id | uint64 | The index's identity. |
index_name | string | The name bound to the index now. A name that looks like a number is a name. |
Response: IndexCheck
| Field | Type | Description |
|---|---|---|
operation | uint64 | Identity of the check: the generation it checks. Inspected with GetIndexCheck, cancelled with CancelIndexCheck. |
index_id | uint64 | Identity of the logical index checked. |
index | string | Name of the index, empty for an unnamed or dropped index. |
label | string | Label whose nodes the index covers, empty once it is dropped. |
integrity | IndexIntegrity | What is known about the generation. |
state | IndexCheckState | Where the latest check stands; UNSPECIFIED when none was admitted. |
phase | IndexCheckPhase | Which half a check is in; UNSPECIFIED when none was admitted. |
passes | uint32 | Complete passes over both halves so far. |
checked | uint64 | Records and entries checked so far. Progress, not proof: only VERIFIED is. |
mismatches | uint64 | Disagreements found so far. |
repaired | uint64 | Disagreements repaired so far. |
conflicts | IndexSourceConflict[] | Pairs of records that hold one value of a unique index: no entry can represent them, and no check changes a record. |
rebuilt_into | uint64 | The generation a rebuild fills, when the damage was too wide to repair entry by entry. Unset otherwise. |
failure | string | Why the check failed, for FAILED; empty otherwise. |
ListIndexChecks
List every index generation's integrity and its latest check.
HTTP: GET /v2/graph/schema/index-checks
Request: ListIndexChecksRequest
Empty request (no fields).
Response: ListIndexChecksResponse
| Field | Type | Description |
|---|---|---|
checks | IndexCheck[] | Every generation with an integrity record, ordered by operation. |
GetIndexCheck
Inspect one check, after waiting up to the request's wait for its outcome. Waiting cancels nothing. An operation no check has fails with NOT_FOUND.
HTTP: GET /v2/graph/schema/index-checks/{operation}
Request: GetIndexCheckRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The check to inspect. Required: an absent operation is refused, never read as operation 0. |
wait | Duration | How long to wait for the check to reach an outcome before answering. Unset or zero: answer at once. |
Response: IndexCheck
| Field | Type | Description |
|---|---|---|
operation | uint64 | Identity of the check: the generation it checks. Inspected with GetIndexCheck, cancelled with CancelIndexCheck. |
index_id | uint64 | Identity of the logical index checked. |
index | string | Name of the index, empty for an unnamed or dropped index. |
label | string | Label whose nodes the index covers, empty once it is dropped. |
integrity | IndexIntegrity | What is known about the generation. |
state | IndexCheckState | Where the latest check stands; UNSPECIFIED when none was admitted. |
phase | IndexCheckPhase | Which half a check is in; UNSPECIFIED when none was admitted. |
passes | uint32 | Complete passes over both halves so far. |
checked | uint64 | Records and entries checked so far. Progress, not proof: only VERIFIED is. |
mismatches | uint64 | Disagreements found so far. |
repaired | uint64 | Disagreements repaired so far. |
conflicts | IndexSourceConflict[] | Pairs of records that hold one value of a unique index: no entry can represent them, and no check changes a record. |
rebuilt_into | uint64 | The generation a rebuild fills, when the damage was too wide to repair entry by entry. Unset otherwise. |
failure | string | Why the check failed, for FAILED; empty otherwise. |
CancelIndexCheck
Cancel a check. Repairs it already committed stay. Returns the check as it stands after the call. An operation no check has fails with NOT_FOUND.
HTTP: POST /v2/graph/schema/index-checks/{operation}/cancel
Request: CancelIndexCheckRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The check to cancel. Required: an absent operation is refused, never read as operation 0. |
Response: IndexCheck
| Field | Type | Description |
|---|---|---|
operation | uint64 | Identity of the check: the generation it checks. Inspected with GetIndexCheck, cancelled with CancelIndexCheck. |
index_id | uint64 | Identity of the logical index checked. |
index | string | Name of the index, empty for an unnamed or dropped index. |
label | string | Label whose nodes the index covers, empty once it is dropped. |
integrity | IndexIntegrity | What is known about the generation. |
state | IndexCheckState | Where the latest check stands; UNSPECIFIED when none was admitted. |
phase | IndexCheckPhase | Which half a check is in; UNSPECIFIED when none was admitted. |
passes | uint32 | Complete passes over both halves so far. |
checked | uint64 | Records and entries checked so far. Progress, not proof: only VERIFIED is. |
mismatches | uint64 | Disagreements found so far. |
repaired | uint64 | Disagreements repaired so far. |
conflicts | IndexSourceConflict[] | Pairs of records that hold one value of a unique index: no entry can represent them, and no check changes a record. |
rebuilt_into | uint64 | The generation a rebuild fills, when the damage was too wide to repair entry by entry. Unset otherwise. |
failure | string | Why the check failed, for FAILED; empty otherwise. |
Reindex
Rebuild a B-tree index from its records into a fresh generation of the same index, and wait up to the request's wait for the build. Writers maintain the new generation at once; a constraint the index enforces stays enforced. Returns the build, which GetIndexBuild inspects. An index that does not exist fails with NOT_FOUND; one that is not a B-tree index with FAILED_PRECONDITION.
HTTP: POST /v2/graph/schema/index-rebuilds
Request: ReindexRequest
| Field | Type | Description |
|---|---|---|
wait | Duration | How long to wait for the build before answering; the build goes on either way. Unset or zero: answer once it is admitted. |
index_id | uint64 | The index's identity. |
index_name | string | The name bound to the index now. A name that looks like a number is a name. |
Response: IndexBuild
| Field | Type | Description |
|---|---|---|
operation | uint64 | Identity of the build, assigned when it is admitted and never reused. Inspected with GetIndexBuild, cancelled with CancelIndexBuild. |
index | string | Name of the index the build fills. Empty once the index is withdrawn. |
label | string | Label whose nodes the index covers. Empty once the index is withdrawn. |
state | IndexBuildState | Where the build stands. |
phase | IndexBuildPhase | Where a RUNNING build stands on the executor of this server holding it; UNSPECIFIED when none does. |
indexed | uint64 | Nodes indexed so far. Progress, not proof of coverage. |
failure | string | Why the build failed, for FAILED; empty otherwise. |
rename_property | string | The property the build may change to repair a duplicate; empty for a build that fails on the first one. |
repaired | uint64 | Repairs the build has committed so far. Each changed a node's value and is listed by ListIndexBuildRepairs; none is undone by a cancellation or a failure of the build. |
Types
ArrayType
A homogeneous array type.
| Field | Type | Description |
|---|---|---|
element | PropertyType | The type of every element. Required. |
CancelIndexBuildRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The build to cancel. Required: an absent operation is refused, never read as operation 0. |
CancelIndexCheckRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The check to cancel. Required: an absent operation is refused, never read as operation 0. |
CheckIndexRequest
| Field | Type | Description |
|---|---|---|
index_id | uint64 | The index's identity. |
index_name | string | The name bound to the index now. A name that looks like a number is a name. |
ComputedPropertyDefinition
A COMPUTED property of a label: evaluated from each node's data, stored once in the label definition and never per node. Read-only; a write to it is refused.
| Field | Type | Description |
|---|---|---|
name | string | Property name, unique within the label and distinct from every stored property name. |
computed_type | ComputedType | Kind of computed property. Required. |
formula_type | DecayFormulaType | Decay formula, for DECAY and VECTOR_DECAY. Ignored for TTL. |
lambda | double | EXPONENTIAL rate, lambda = ln(2) / half_life_fraction, where half_life_fraction is the half-life as a fraction of duration_secs. |
tau | double | POWER_LAW time scale as a fraction of the duration, greater than 0. |
alpha | double | POWER_LAW exponent, greater than 0. |
initial | double | DECAY value at elapsed = 0. |
target | double | DECAY value once elapsed >= duration_secs. |
duration_secs | uint64 | Length of the decay, or the TTL, in seconds. Greater than 0. |
anchor_field | string | Name of the TIMESTAMP property elapsed time is measured from. Required; must be a stored TIMESTAMP property of the same label. |
scope | TtlScopeType | TTL only: what expiry deletes. |
target_field | string | TTL with scope SUBTREE only: the DOCUMENT property expiry deletes. Empty otherwise. |
Constraint
A named constraint as the catalog holds it.
| Field | Type | Description |
|---|---|---|
name | string | Constraint name, unique in the database. |
properties | string[] | The constrained properties, in declaration order; the order is the column order of the supporting index. |
kind | ConstraintKind | What the constraint requires. |
property_type | PropertyType | The required type, for kind PROPERTY_TYPE; unset for every other kind. |
state | ConstraintState | Where the constraint is in its life. |
backing_index | string | Name of the index the constraint owns and is enforced through, for UNIQUE and NODE_KEY; empty for the kinds checked on each node alone. The index is dropped with the constraint and cannot be dropped on its own. |
build | IndexBuild | The build of the backing index, for UNIQUE and NODE_KEY: while the constraint is VALIDATING, the operation deciding whether it becomes ACTIVE. Unset for the kinds checked on each node alone. |
scope | ConstraintScope | For UNIQUE, the nodes the uniqueness holds among: only nodes the predicate admits are compared, and the backing index holds only them. Unset: every node of the label. |
label | string | The nodes whose label is this one. |
ConstraintScope
The predicate that scopes a UNIQUE constraint: a test of one property of a node. A partial unique index (CREATE UNIQUE INDEX ... WHERE) declares a uniqueness with its predicate as the scope.
| Field | Type | Description |
|---|---|---|
property | string | The property the predicate tests. Required. |
equals_string | string | The property equals this string. |
equals_int | int64 | The property equals this integer. |
equals_bool | bool | The property equals this boolean. |
present | Empty | The property is present and not null. |
CreateConstraintRequest
| Field | Type | Description |
|---|---|---|
name | string | Constraint name, unique in the database. Empty: the server derives one and returns it. |
properties | string[] | The constrained properties, in order. NOT_NULL and PROPERTY_TYPE take exactly one; UNIQUE and NODE_KEY take one or more, with no repeats. |
kind | ConstraintKind | What the constraint requires. Required. |
property_type | PropertyType | The required type, for kind PROPERTY_TYPE; must be unset for any other kind. |
if_not_exists | bool | When true, a constraint of the same name, or one requiring the same of the same properties of the same label, already in place makes the call succeed and return that constraint, VALIDATING with its running build included: a retry after a lost reply finds the build the first call admitted rather than admitting a second. When false, either is refused. |
wait | Duration | How long the call waits for the build of the backing index. Unset: the server's default (index_build_statement_wait_secs). Zero: the call returns once the constraint and its build are admitted. Ignored for the kinds checked on each node alone, which have no build. |
on_duplicate_rename | string | UNIQUE and NODE_KEY only: a string property among properties the build may change to end a duplicate it finds in the stored data, by appending a random suffix to one holder's value (ON DUPLICATE RENAME). Each repair commits as its own transaction, is visible at once, and is kept whatever the build's outcome. Empty: the build fails on the first duplicate. Later writes are refused as duplicates as always. |
scope | ConstraintScope | UNIQUE only: the nodes the uniqueness holds among. Unset: every node of the label. Two constraints over the same properties with different scopes are different constraints. |
label | string | The label whose nodes are constrained. |
CreateEdgeTypeRequest
| Field | Type | Description |
|---|---|---|
name | string | Edge type name, for example "FOLLOWS". Case-sensitive. An edge type that already has a definition is refused. |
properties | PropertyDefinition[] | Stored properties. Names are unique within the request. |
temporal | bool | Whether edges of the type are temporal. Cannot be changed later. |
discriminator | string | The declared property that, with the endpoints, identifies one edge, so one endpoint pair can hold several edges of the type. It must be a NOT NULL property of type INT64, FLOAT64, BOOL, TIMESTAMP, STRING or BLOB. Empty: at most one edge per endpoint pair, or, for a temporal type, edges identified by their "valid_from". Cannot be changed later. |
CreateLabelRequest
| Field | Type | Description |
|---|---|---|
name | string | Label name, for example "User". Case-sensitive. A label that already has a definition is refused. |
properties | PropertyDefinition[] | Stored properties. Names are unique within the request. |
computed_properties | ComputedPropertyDefinition[] | Computed properties. Names are unique and distinct from the stored ones. |
schema_mode | SchemaMode | How the label validates and stores properties. |
temporal | bool | Whether nodes of the label are bitemporal. Cannot be changed later. |
DropConstraintRequest
| Field | Type | Description |
|---|---|---|
name | string | Name of the constraint to drop. |
if_exists | bool | When true, a missing constraint makes the call succeed. When false, it is refused. |
EdgeType
An edge type as the catalog holds it.
| Field | Type | Description |
|---|---|---|
name | string | Edge type name. Case-sensitive. |
declared | bool | False for an edge type stored edges carry without a definition; every other field is then empty. |
properties | PropertyDefinition[] | Stored properties, by name. |
temporal | bool | Whether edges of the type carry a valid-time interval. |
schema_revision | uint64 | Revision of the definition. See Label.schema_revision. |
discriminator | string | The property whose value, with the edge type and the two endpoints, identifies one edge: one endpoint pair holds one edge per value. Empty for a type with at most one edge per endpoint pair. A temporal type that named none at creation is identified by "valid_from". Fixed when the type is created. |
GetIndexBuildRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The build to inspect. Required: an absent operation is refused, never read as operation 0. |
wait | Duration | How long to wait for the build to reach an outcome before answering. Unset or zero: answer at once. |
GetIndexCheckRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The check to inspect. Required: an absent operation is refused, never read as operation 0. |
wait | Duration | How long to wait for the check to reach an outcome before answering. Unset or zero: answer at once. |
IndexBuild
An index build: the server-owned operation that fills one index and publishes it, independent of the request, connection or member that admitted it.
| Field | Type | Description |
|---|---|---|
operation | uint64 | Identity of the build, assigned when it is admitted and never reused. Inspected with GetIndexBuild, cancelled with CancelIndexBuild. |
index | string | Name of the index the build fills. Empty once the index is withdrawn. |
label | string | Label whose nodes the index covers. Empty once the index is withdrawn. |
state | IndexBuildState | Where the build stands. |
phase | IndexBuildPhase | Where a RUNNING build stands on the executor of this server holding it; UNSPECIFIED when none does. |
indexed | uint64 | Nodes indexed so far. Progress, not proof of coverage. |
failure | string | Why the build failed, for FAILED; empty otherwise. |
rename_property | string | The property the build may change to repair a duplicate; empty for a build that fails on the first one. |
repaired | uint64 | Repairs the build has committed so far. Each changed a node's value and is listed by ListIndexBuildRepairs; none is undone by a cancellation or a failure of the build. |
IndexBuildRepair
One duplicate a build repaired: the value of property it replaced on a node.
| Field | Type | Description |
|---|---|---|
element_id | string | The node it changed, as an element id. |
property | string | The property it changed. |
old_value | string | The value the node held, which another node held too. |
new_value | string | The value the node holds since the repair. |
IndexCheck
One index generation's integrity and its latest check: the server-owned operation that compares an index with its records, repairs the entries that disagree, and rebuilds the index when the damage is too wide.
| Field | Type | Description |
|---|---|---|
operation | uint64 | Identity of the check: the generation it checks. Inspected with GetIndexCheck, cancelled with CancelIndexCheck. |
index_id | uint64 | Identity of the logical index checked. |
index | string | Name of the index, empty for an unnamed or dropped index. |
label | string | Label whose nodes the index covers, empty once it is dropped. |
integrity | IndexIntegrity | What is known about the generation. |
state | IndexCheckState | Where the latest check stands; UNSPECIFIED when none was admitted. |
phase | IndexCheckPhase | Which half a check is in; UNSPECIFIED when none was admitted. |
passes | uint32 | Complete passes over both halves so far. |
checked | uint64 | Records and entries checked so far. Progress, not proof: only VERIFIED is. |
mismatches | uint64 | Disagreements found so far. |
repaired | uint64 | Disagreements repaired so far. |
conflicts | IndexSourceConflict[] | Pairs of records that hold one value of a unique index: no entry can represent them, and no check changes a record. |
rebuilt_into | uint64 | The generation a rebuild fills, when the damage was too wide to repair entry by entry. Unset otherwise. |
failure | string | Why the check failed, for FAILED; empty otherwise. |
IndexSourceConflict
Two records holding one value of a unique index.
| Field | Type | Description |
|---|---|---|
element_ids | string[] | The nodes holding the value, as element ids. |
Label
A node label as the catalog holds it.
| Field | Type | Description |
|---|---|---|
name | string | Label name. Case-sensitive. |
declared | bool | False for a label stored nodes carry without a definition; every other field is then empty. |
properties | PropertyDefinition[] | Stored properties, by name. |
computed_properties | ComputedPropertyDefinition[] | Computed properties, by name. |
schema_mode | SchemaMode | How the label validates and stores properties. |
temporal | bool | Whether nodes of the label carry a valid-time interval and keep one version per interval start. Fixed when the label is created. |
schema_revision | uint64 | Revision of the definition. Every published change of the definition or of the label's constraints advances it; a published revision never changes. |
ListConstraintsRequest
No fields.
ListConstraintsResponse
| Field | Type | Description |
|---|---|---|
constraints | Constraint[] | Every constraint, ordered by name. |
ListEdgeTypesRequest
No fields.
ListEdgeTypesResponse
| Field | Type | Description |
|---|---|---|
edge_types | EdgeType[] | Every edge type, ordered by name. |
ListIndexBuildRepairsRequest
| Field | Type | Description |
|---|---|---|
operation | uint64 | The build whose repairs to list. Required: an absent operation is refused, never read as operation 0. |
ListIndexBuildRepairsResponse
| Field | Type | Description |
|---|---|---|
repairs | IndexBuildRepair[] | Every repair the build committed, ordered by node. |
ListIndexBuildsRequest
No fields.
ListIndexBuildsResponse
| Field | Type | Description |
|---|---|---|
builds | IndexBuild[] | Every build, ordered by operation. |
ListIndexChecksRequest
No fields.
ListIndexChecksResponse
| Field | Type | Description |
|---|---|---|
checks | IndexCheck[] | Every generation with an integrity record, ordered by operation. |
ListLabelsRequest
No fields.
ListLabelsResponse
| Field | Type | Description |
|---|---|---|
labels | Label[] | Every label, ordered by name. |
MultiVector
An ordered set of equal-width vectors representing one item, as produced by late-interaction retrieval models (ColBERT v2, MaxSim) where a document is several token-level embeddings rather than one pooled vector.
Every row carries the same number of dimensions; the sender enforces that invariant, so a receiver may read rows[0] for the width.
| Field | Type | Description |
|---|---|---|
rows | Vector[] | — |
Path
A graph path: the alternating node/relationship sequence produced by shortestPath(...) and by a variable-length MATCH p = (a)-[*]->(b).
rels has exactly one fewer entry than nodes on a non-empty path, and the n-th hop connects nodes[n] to nodes[n+1]. An empty path (a single node, zero hops) carries one node and no relationships.
| Field | Type | Description |
|---|---|---|
nodes | uint64[] | Node ids along the path, start to end. |
rels | PathRel[] | Relationship hops, in the same order. |
PathRel
One relationship hop inside a Path: its type and endpoint node ids. Relationship properties are not carried; fetch them by endpoint pair when they are needed.
| Field | Type | Description |
|---|---|---|
edge_type | string | — |
source | uint64 | — |
target | uint64 | — |
PropertyDefinition
A stored property of a label or edge type. Carries the type facts of one property only; whether its values are unique is a constraint, listed by ListConstraints.
| Field | Type | Description |
|---|---|---|
name | string | Property name, unique within the label or edge type. Case-sensitive. |
type | PropertyType | Declared type of the property's values. Required. |
required | bool | Whether every record must carry a non-null value. A write without one is refused. |
default_value | PropertyValue | Value a record reads when it does not carry the property. Unset: no default, and a missing property reads as null. |
PropertyType
The declared type of a stored property.
| Field | Type | Description |
|---|---|---|
scalar | ScalarType | A type without parameters. |
vector | VectorType | A dense vector with its dimensions and metric. |
array | ArrayType | An array of elements of one type. |
ReindexRequest
| Field | Type | Description |
|---|---|---|
wait | Duration | How long to wait for the build before answering; the build goes on either way. Unset or zero: answer once it is admitted. |
index_id | uint64 | The index's identity. |
index_name | string | The name bound to the index now. A name that looks like a number is a name. |
Timestamp
An instant on the time axis of a TIMESTAMP property.
| Field | Type | Description |
|---|---|---|
unix_micros | int64 | Microseconds since the Unix epoch (1970-01-01T00:00:00Z), signed: an instant before the epoch is negative. Microseconds are the database's own resolution, so the value round-trips exactly; a client converts it to its native type (a nanosecond type reaches it losslessly). |
VectorType
A dense vector type.
| Field | Type | Description |
|---|---|---|
dimensions | uint32 | Number of coordinates every value must have, from 1 to 65536. Zero declares no fixed length: values of any length are accepted, and a vector index takes its dimensions from its own definition. |
metric | DistanceMetric | Distance metric the property is compared by. UNSPECIFIED means COSINE. |
Enums
ComputedType
The kind of COMPUTED property.
| Value | Number | Description |
|---|---|---|
COMPUTED_TYPE_UNSPECIFIED | 0 | Not a kind. Refused. |
COMPUTED_TYPE_TTL | 1 | The node, or part of it, is deleted once duration_secs has elapsed since the anchor_field timestamp; scope says which part. |
COMPUTED_TYPE_DECAY | 2 | Value interpolated from initial to target over duration_secs, evaluated when read: initial + (target - initial) * formula(elapsed). |
COMPUTED_TYPE_VECTOR_DECAY | 3 | Multiplier in [0, 1] that a vector similarity score is scaled by when read, from the formula over the time elapsed since anchor_field. |
ConstraintKind
What a constraint requires of the properties it names.
| Value | Number | Description |
|---|---|---|
CONSTRAINT_KIND_UNSPECIFIED | 0 | Not a kind. Refused. |
CONSTRAINT_KIND_UNIQUE | 1 | No two nodes of the label share the values of the properties. A node missing any of them is not constrained. |
CONSTRAINT_KIND_NOT_NULL | 2 | The one named property is present and not null on every node. |
CONSTRAINT_KIND_NODE_KEY | 3 | Every named property is present and not null, and no two nodes share their values. |
CONSTRAINT_KIND_PROPERTY_TYPE | 4 | A present, non-null value of the one named property has the constraint's property_type. |
ConstraintState
Where a constraint is in its life.
| Value | Number | Description |
|---|---|---|
CONSTRAINT_STATE_UNSPECIFIED | 0 | Never sent. |
CONSTRAINT_STATE_VALIDATING | 1 | Enforced on every write while its index is still being checked against the stored data: the guarantee over data stored before it is not established yet. The check is the index build named in Constraint.build; its outcome makes the constraint ACTIVE or withdraws it. A build a restart or a change of leader interrupted is taken up again. |
CONSTRAINT_STATE_ACTIVE | 2 | Checked against the stored data and enforced on every write. |
DecayFormulaType
Decay formula of a DECAY or VECTOR_DECAY computed property. Every formula maps normalized time t in [0, 1] to a weight in [0, 1].
| Value | Number | Description |
|---|---|---|
DECAY_FORMULA_TYPE_UNSPECIFIED | 0 | LINEAR. |
DECAY_FORMULA_TYPE_LINEAR | 1 | f(t) = max(0, 1 - t): constant rate, zero at the end of the duration. |
DECAY_FORMULA_TYPE_EXPONENTIAL | 2 | f(t) = e^(-lambda * t). Requires lambda. |
DECAY_FORMULA_TYPE_POWER_LAW | 3 | f(t) = (1 + t / tau)^(-alpha): fast early decay with a long tail. Requires tau and alpha. |
DECAY_FORMULA_TYPE_STEP | 4 | f(t) = 1 while t < 1, then 0. |
DistanceMetric
| Value | Number | Description |
|---|---|---|
DISTANCE_METRIC_UNSPECIFIED | 0 | — |
DISTANCE_METRIC_COSINE | 1 | — |
DISTANCE_METRIC_L2 | 2 | — |
DISTANCE_METRIC_DOT | 3 | — |
DISTANCE_METRIC_L1 | 4 | — |
IndexBuildPhase
Where a RUNNING build stands on the executor holding it.
| Value | Number | Description |
|---|---|---|
INDEX_BUILD_PHASE_UNSPECIFIED | 0 | Not running on an executor of this server. |
INDEX_BUILD_PHASE_AWAITING_SEAT | 1 | Waiting for a seat: as many builds as the server runs at once (index_build_max_running) are filling indexes. |
INDEX_BUILD_PHASE_AWAITING_OLDER_TRANSACTIONS | 2 | Waiting for the transactions opened before the index existed to end. |
INDEX_BUILD_PHASE_INDEXING | 3 | Filling the index. |
IndexBuildState
Where an index build stands.
| Value | Number | Description |
|---|---|---|
INDEX_BUILD_STATE_UNSPECIFIED | 0 | Never sent. |
INDEX_BUILD_STATE_ACCEPTED | 1 | Admitted with its index; no executor has taken it yet. |
INDEX_BUILD_STATE_RUNNING | 2 | An executor is filling the index; phase says where. |
INDEX_BUILD_STATE_PUBLISHED | 3 | The index was published ready, and a constraint owning it made ACTIVE. |
INDEX_BUILD_STATE_FAILED | 4 | The stored data refused the index; failure says why. A new index was withdrawn with the constraint owning it; a rebuilt one is kept, failed. |
INDEX_BUILD_STATE_CANCELLED | 5 | Cancelled before it had an outcome; the same withdrawal as FAILED. |
IndexCheckPhase
Which half of a check is running.
| Value | Number | Description |
|---|---|---|
INDEX_CHECK_PHASE_UNSPECIFIED | 0 | Never sent. |
INDEX_CHECK_PHASE_RECORDS | 1 | Every record of the label, checked for the entries its values give it. |
INDEX_CHECK_PHASE_ENTRIES | 2 | Every entry of the generation, checked for a record holding its value. |
IndexCheckState
Where an index check stands.
| Value | Number | Description |
|---|---|---|
INDEX_CHECK_STATE_UNSPECIFIED | 0 | Never sent. |
INDEX_CHECK_STATE_ACCEPTED | 1 | Admitted; no executor has taken it yet. |
INDEX_CHECK_STATE_RUNNING | 2 | An executor is checking; phase says which half. |
INDEX_CHECK_STATE_DONE | 3 | The check reached its end; integrity says what it found. |
INDEX_CHECK_STATE_FAILED | 4 | The check could not finish; failure says why. |
INDEX_CHECK_STATE_CANCELLED | 5 | Cancelled before its end. Repairs it committed stay. |
IndexIntegrity
What is known about whether an index generation's entries agree with the records they are derived from. Separate from its build state.
| Value | Number | Description |
|---|---|---|
INDEX_INTEGRITY_UNSPECIFIED | 0 | Never sent. |
INDEX_INTEGRITY_UNCHECKED | 1 | Nothing was found wrong and no check has completed: the index serves as its build state says. |
INDEX_INTEGRITY_SUSPECT | 2 | An entry was found disagreeing with its record. Lookups in the index answer from the records, and its unique values are proved free from them, until a check verifies or rebuilds it. |
INDEX_INTEGRITY_VERIFIED | 3 | A complete check found every entry and every record in agreement. |
ScalarType
The scalar property types: types that take no parameters.
| Value | Number | Description |
|---|---|---|
SCALAR_TYPE_UNSPECIFIED | 0 | Not a type. Refused when a type is required. |
SCALAR_TYPE_STRING | 1 | UTF-8 text. |
SCALAR_TYPE_INT64 | 2 | Signed 64-bit integer. |
SCALAR_TYPE_FLOAT64 | 3 | IEEE 754 binary64 floating point number. |
SCALAR_TYPE_BOOL | 4 | Boolean. |
SCALAR_TYPE_TIMESTAMP | 5 | Point in time. |
SCALAR_TYPE_BLOB | 6 | Large binary object stored apart from the record and read by reference. |
SCALAR_TYPE_BINARY | 7 | Binary value stored inline in the record. |
SCALAR_TYPE_MAP | 8 | Map of string keys to values. |
SCALAR_TYPE_GEO | 9 | Geographic point or shape. |
SCALAR_TYPE_DOCUMENT | 10 | Arbitrary nested document; its content is not type-checked. |
SchemaMode
How a label validates and stores the properties of its nodes.
| Value | Number | Description |
|---|---|---|
SCHEMA_MODE_UNSPECIFIED | 0 | STRICT. |
SCHEMA_MODE_STRICT | 1 | Only declared properties are accepted; a write with any other is refused. Property names are interned, the most compact form. |
SCHEMA_MODE_VALIDATED | 2 | Declared properties are type-checked and interned; other properties are accepted unchecked and stored by name. |
SCHEMA_MODE_FLEXIBLE | 3 | No property is checked against the definition beyond requiredness and defaults; every property is stored by name. |
TtlScopeType
What a TTL computed property deletes when it expires.
| Value | Number | Description |
|---|---|---|
TTL_SCOPE_TYPE_UNSPECIFIED | 0 | NODE. |
TTL_SCOPE_TYPE_FIELD | 1 | Only the anchor_field property; the node remains. |
TTL_SCOPE_TYPE_SUBTREE | 2 | Only the DOCUMENT property named by target_field; the anchor_field timestamp remains. |
TTL_SCOPE_TYPE_NODE | 3 | The whole node with all its edges. |
