You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/ops/storages.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,24 +70,24 @@ The `Neo4j` storage exports each row as a relationship to Neo4j Knowledge Graph.
70
70
*`password` (type: `str`): Password for the Neo4j database.
71
71
*`db` (type: `str`, optional): The name of the Neo4j database to use as the internal storage, e.g. `neo4j`.
72
72
*`mapping`: The mapping from collected row to nodes or relationships of the graph. 2 variations are supported:
73
-
*`cocoindex.storages.GraphNode`: each collected row is mapped to a node in the graph. It has the following fields:
73
+
*`cocoindex.storages.NodeMapping`: Each collected row is mapped to a node in the graph. It has the following fields:
74
74
*`label`: The label of the node.
75
-
*`cocoindex.storages.GraphRelationship`: each collected row is mapped to a relationship in the graph,
75
+
*`cocoindex.storages.RelationshipMapping`: Each collected row is mapped to a relationship in the graph,
76
76
With the following fields:
77
77
78
78
*`rel_type` (type: `str`): The type of the relationship.
79
-
*`source`/`target` (type: `cocoindex.storages.GraphRelationshipEnd`): The source/target node of the relationship, with the following fields:
79
+
*`source`/`target` (type: `cocoindex.storages.NodeReferenceMapping`): The source/target node of the relationship, with the following fields:
80
80
*`label` (type: `str`): The label of the node.
81
-
*`fields` (type: `list[cocoindex.storages.GraphFieldMapping]`): Map fields from the collector to nodes in Neo4j, with the following fields:
82
-
*`field_name` (type: `str`): The name of the field in the collected row.
83
-
*`node_field_name` (type: `str`, optional): The name of the field to use as the node field. If unspecified, will use the same as `field_name`.
81
+
*`fields` (type: `Sequence[cocoindex.storages.TargetFieldMapping]`): Map fields from the collector to nodes in Neo4j, with the following fields:
82
+
*`source` (type: `str`): The name of the field in the collected row.
83
+
*`target` (type: `str`, optional): The name of the field to use as the node field. If unspecified, will use the same as `source`.
84
84
85
85
:::info
86
86
87
-
All fields specified in `fields` will be mapped to properties of source/target nodes. All remaining fields will be mapped to relationship properties by default.
87
+
All fields specified in `fields.source` will be mapped to properties of source/target nodes. All remaining fields will be mapped to relationship properties by default.
88
88
89
89
:::
90
90
91
-
* `nodes` (type: `dict[str, cocoindex.storages.GraphRelationshipNode]`): This configures indexes for different node labels. Key is the node label. The value type `GraphRelationshipNode` has the following fields to configure [storage indexes](../core/flow_def#storage-indexes) for the node.
91
+
* `nodes_storage_spec` (type: `dict[str, cocoindex.storages.NodeStorageSpec]`): This configures indexes for different node labels. Key is the node label. The value type `NodeStorageSpec` has the following fields to configure [storage indexes](../core/flow_def#storage-indexes) for the node.
92
92
* `primary_key_fields` is required.
93
93
* `vector_indexes` is also supported and optional.
0 commit comments