Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
* xref:file-provision.adoc[]
* xref:modeling.adoc[]
* xref:mapping.adoc[]
* xref:indexes-constraints.adoc[]
* xref:import.adoc[]
* xref:import-others.adoc[]
Binary file added modules/ROOT/images/Group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/ROOT/images/constraints-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/ROOT/images/di-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This manual covers the following areas:
* xref:file-provision.adoc[File provision] -- How to provide files for import.
* xref:modeling.adoc[Modeling] -- Guidelines to model your data.
* xref:mapping.adoc[Mapping] -- How to map your data to the model.
* xref:indexes-constraints.adoc[Indexes and constraints] -- Optimize query performance.
* xref:import.adoc[Import] -- Preview and import your data.
* xref:import-others.adoc[Other options for data import] -- Other ways to import data.

Expand Down
30 changes: 30 additions & 0 deletions modules/ROOT/pages/indexes-constraints.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
:description: This section describes how to use indexes and constraints in Data Importer
= Indexes and constraints

Data Importer supports adding indexes to improve read performance of queries and creates constraints to ensure the accuracy of data.
They are found in the details panel and the tab is visible when a single node is selected in the data model panel.

image::constraints-tab.png[]

Once a node is mapped to a file and a property is selected to serve as its ID, both a constraint and an index are created automatically.

== Constraints

A uniqueness constraint is created on the node property selected as node ID.
This ensures that no other node with the same ID is created and to achieve that, a corresponding index is also created to support that constraint.
It is not possible to modify the uniqueness constraint nor to add any additional constraints.
For more information on constraints see link:https://neo4j.com/docs/cypher-manual/current/constraints/#unique-node-property[Cypher Manual -> Constraints].

== Indexes

As mentioned previously, an index is created automatically on the assigned ID property for a node to support the uniqueness constraint.
This index cannot be modified in any way from this tab, but if you change which property to use as ID, both the constraint and corresponding index change accordingly.

You can add more indexes with the `+` and then select which property to index from the dropdown menu.
If you know that you will regularly look at a specific property, it is good practice to add an index to that property.
For example in the Northwind dataset, if you know you are going to be looking for orders in a specific date range, it is advisable to add an index to the `orderDate` property.

Regardless of which property you add the index to, the index type is Neo4j's default index, which is `range` for Neo4j 5 and `btree` for Neo4j 4.x.
For more information on indexes, see link:https://neo4j.com/docs/cypher-manual/current/indexes/[Cypher Manual -> Indexes].


2 changes: 1 addition & 1 deletion modules/ROOT/pages/mapping.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Affected elements already imported are updated and **not** duplicated.

== Nodes

To map a node to a file, the node needs to have a label, which you can type directly on the node or in the mapping detals panel.
To map a node to a file, the node needs to have a label, which you can type directly on the node or in the mapping details panel.
After naming the label, you can select the file to map to the node.
Adding the file can be done at any time before running the import, but it is convenient to do it at this stage.

Expand Down
8 changes: 4 additions & 4 deletions modules/ROOT/pages/overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ See xref:import.adoc#run-import[Run the import] for more information about the c
The `...` menu contains options to open a saved model, with or without data, to save your current model, with or without data, settings for the import, and an option to clear everything.
For more information on the settings, see xref:mapping.adoc#exclude-list[Node exclude list].


== Details panel

Every element in the data model is mapped in this section.
This is where you give labels to nodes and relationships, map them to files from the files panel, and specify their properties.
The details panel contains two tabs, _Definition_ and _Constraints & Indexes_.
The _Defintion_ tab is where you give labels to nodes and relationships, map them to files from the files panel, and specify their properties.
See xref:mapping.adoc[] for more information.

The _Constraints & Indexes_ tab allows you to see details about constraints and indexes and lets you add or modify the latter.
See xref:indexes-constraints.adoc[] for more information.