Constraints and indexes
Constraints are listed under the constraints of a node or relationship, and indexes under the indexes of its
extensions, each keyed by id.
nodes:
movie:
label: Movie
properties:
title:
type: STRING
released:
type: INTEGER
constraints:
movie-title-unique:
type: UNIQUE
properties: [title]
extensions:
indexes:
movie-released:
type: RANGE
labels: [Movie]
properties: [released]
Node constraint
A constraint on a node.
| Field | Type | Required | Description |
|---|---|---|---|
|
Yes |
Type of the constraint. |
|
|
list of strings |
Yes |
Ids of the properties the constraint covers. |
|
No |
Extensions for the constraint. |
|
|
string |
No |
Name of the constraint in the database. |
Relationship constraint
A constraint on a relationship.
| Field | Type | Required | Description |
|---|---|---|---|
|
Yes |
Type of the constraint. |
|
|
list of strings |
Yes |
Ids of the properties the constraint covers. |
|
No |
Extensions for the constraint. |
|
|
string |
No |
Name of the constraint in the database. |
Constraint type
| Type | Requires that |
|---|---|
|
Every node or relationship has the property. |
|
No two nodes or relationships have the same values for the properties. |
|
Every node or relationship has the properties, and no two have the same values for them. |
|
The property’s values have the property’s |
Node index
An index on a node.
| Field | Type | Required | Description |
|---|---|---|---|
|
Yes |
Type of the index. |
|
|
list of strings |
Yes |
Labels the index covers. |
|
list of strings |
Yes |
Ids of the properties the index covers. |
|
No |
Configuration specific to the type of index. |
|
|
map |
No |
User-defined arbitrary data. |
|
string |
No |
Name of the index in the database. |
Relationship index
An index on a relationship.
| Field | Type | Required | Description |
|---|---|---|---|
|
Yes |
Type of the index. |
|
|
list of strings |
Yes |
Ids of the properties the index covers. |
|
No |
Configuration specific to the type of index. |
|
|
map |
No |
User-defined arbitrary data. |
|
string |
No |
Name of the index in the database. |
Index options
Configuration specific to the type of an index.
One of full-text options, point options, vector options,
chosen by its type.
Full-text options
Configuration of a full-text index.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
Yes |
Always |
|
string |
No |
Analyzer used when the index doesn’t specify one. |
|
string |
No |
Analyzer used by the index. |
|
boolean |
No |
Whether the index is eventually consistent, updating asynchronously after transactions commit. |
|
integer |
No |
Number of threads used to apply updates to an eventually consistent index. |
|
string |
No |
How often an eventually consistent index is refreshed. |
|
integer |
No |
Number of threads used to refresh an eventually consistent index. |
|
integer |
No |
Maximum number of pending updates queued for an eventually consistent index. |
Point options
Configuration of a point index.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
Yes |
Always |
|
list of numbers |
No |
Lower bounds of the 2D cartesian space. |
|
list of numbers |
No |
Upper bounds of the 2D cartesian space. |
|
list of numbers |
No |
Lower bounds of the 3D cartesian space. |
|
list of numbers |
No |
Upper bounds of the 3D cartesian space. |
|
list of numbers |
No |
Lower bounds of the 2D WGS-84 space. |
|
list of numbers |
No |
Upper bounds of the 2D WGS-84 space. |
|
list of numbers |
No |
Lower bounds of the 3D WGS-84 space. |
|
list of numbers |
No |
Upper bounds of the 3D WGS-84 space. |
Vector options
Configuration of a vector index.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
Yes |
Always |
|
integer |
No |
Number of dimensions of the indexed vectors. |
|
string |
No |
Function used to compare vectors, e.g. cosine or euclidean. |
|
number |
No |
Default expansion factor applied to searches of the index. |
|
boolean |
No |
Whether vector quantization is enabled. |
|
string |
No |
Type of vector quantization used. |
|
integer |
No |
Maximum number of connections per node in the HNSW graph. |
|
integer |
No |
Number of nearest neighbours considered when building the HNSW graph. |