Skip to content

Commit 956a367

Browse files
Merge pull request #39 from AlexicaWright/add-indexes-data-importer
Add indexes data importer
2 parents d36c385 + cc52b34 commit 956a367

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

documentation/data-importer.adoc

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ Workspace guesses each datatype based on a sample of the values it found.
9999
Always double-check this when working with unfamiliar data.
100100
For example, Northwind's date/time columns are identified as strings, but you can edit that if you want to.
101101
====
102-
// TODO: properties with same name... this needs rewording for clarity.
103-
102+
// TODO: properties with same name... this needs rewording for clarity
104103

105104
== Relationships and IDs
106105

@@ -120,7 +119,6 @@ You can also specify properites and their data types in isolation from mapping b
120119
You can then map a column from your data file to the property in the file mapping tab.
121120
====
122121

123-
124122
=== Create the Product node
125123

126124
Now you just need to repeat the process you followed for `Order` and create a `Product` node from the `products.csv` file.
@@ -138,6 +136,34 @@ If you're unsure if you've followed the steps correctly so far, you can go ahead
138136
button::Load Northwind node mapping[role=NX_IMPORT_LOAD,endpoint={northwind-subset-node-only-mapping-zip-file}]
139137
====
140138

139+
== Constraints and indexes
140+
141+
To ensure accuracy of your data and support read performance, Data Importer automatically creates a uniqueness constraint and a corresponding index on the property you select as the node ID.
142+
You can add further indexes in addition to the mandatory constraint and index.
143+
144+
Constraints and indexes have their own tab in the highlight:import/import-mapping-panel[mapping details panel].
145+
Use the `+`-sign to add an index and then select which property to add the index on.
146+
147+
Data Importer generates a name for the index and the index type created is Neo4j's default index.
148+
If you make a mistake, select the erroneous index and click the trash-can to delete it.
149+
150+
If you know that you are going to use a property regularly, it is good practice to add an index to it.
151+
For example, if you doing administrative work with Northwind, you may be interested in the order dates.
152+
See if you can add an index to the `orderDate` property that will help you with that!
153+
154+
[%collapsible]
155+
.Hint
156+
====
157+
From the highlight:import/import-mapping-panel[mapping details panel], tap the `+` and select the `orderDate` property.
158+
====
159+
160+
[NOTE]
161+
====
162+
Only the properties you mapped from the _Definition_ tab are available to create indexes on.
163+
To modify the selection, you need to go back to the _Definition_ tab.
164+
====
165+
166+
To learn more about indexes and constraints, see link:https://neo4j.com/docs/cypher-manual/current/indexes/[Cypher Manual -> Indexes] and link:https://neo4j.com/docs/cypher-manual/current/constraints/[Cypher Manual -> Constraints] repsectively.
141167

142168
== Create relationships
143169

0 commit comments

Comments
 (0)