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
5 changes: 5 additions & 0 deletions src/browser/documentation/help/create-index-on.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ const content = (
</div>
<section className="example">
<figure>
<p>On neo4j version 4.X</p>
<pre className="code runnable standalone-example">
CREATE INDEX [optionalName] FOR (p:Person) ON (p.name)
</pre>
<p>On neo4j version 3.X</p>
<pre className="code runnable standalone-example">
CREATE INDEX ON :Person(name)
</pre>
Expand Down
16 changes: 15 additions & 1 deletion src/shared/modules/favorites/staticScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,21 @@ export const scripts = [
not_executable: true,
content:
"// Create an index\n// Replace:\n// 'LabelName' with label to index\n// 'propertyKey' with property to be indexed\nCREATE INDEX ON :<LabelName>(<propertyKey>)",
versionRange: '>=3'
versionRange: '>=3 <4'
},
{
folder: 'basics',
not_executable: true,
content: `// Create an index
// Replace:
// 'IndexName' with name of index (optional)
// 'LabelName' with label to index
// 'propertyName' with property to be indexed
CREATE INDEX [IndexName]
FOR (n:LabelName)
ON (n.propertyName)
`,
versionRange: '>=4'
},
{
folder: 'basics',
Expand Down