diff --git a/src/browser/documentation/help/create-index-on.jsx b/src/browser/documentation/help/create-index-on.jsx index 68201904f3c..a1d3c585bb6 100644 --- a/src/browser/documentation/help/create-index-on.jsx +++ b/src/browser/documentation/help/create-index-on.jsx @@ -52,6 +52,11 @@ const content = (
+

On neo4j version 4.X

+
+          CREATE INDEX [optionalName] FOR (p:Person) ON (p.name)
+        
+

On neo4j version 3.X

           CREATE INDEX ON :Person(name)
         
diff --git a/src/shared/modules/favorites/staticScripts.js b/src/shared/modules/favorites/staticScripts.js index 4802458447e..d2fb0d4216f 100644 --- a/src/shared/modules/favorites/staticScripts.js +++ b/src/shared/modules/favorites/staticScripts.js @@ -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 :()", - 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',