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: modules/ROOT/pages/values-and-types/vector.adoc
+37-14Lines changed: 37 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
= Vectors
2
2
:description: Information about Cypher's `VECTOR` type.
3
-
:page-role: cypher-25-only new-neo4j-2025.xx
4
-
3
+
:page-role: new-neo4j-2025.xx
5
4
6
5
Cypher supports the construction of a `VECTOR` value that can be stored as xref:indexes/semantic-indexes/vector-indexes.adoc#embeddings[embedding] properties on nodes and relationships and utilized for efficient semantic retrieval using Neo4j's xref:indexes/semantic-indexes/vector-indexes.adoc[vector indexes] and xref:genai-integrations.adoc[GenAI plugin].
7
6
`VECTOR` values can also be measured and compared (in terms of similarity, distance, and norm) using Cypher's xref:functions/vector.adoc[Vector functions].
@@ -66,7 +65,6 @@ See also:
66
65
To construct a `VECTOR` value, use the xref:functions/vector.adoc#functions-vector[`vector()`] function.
67
66
68
67
The following query constructs a three-dimensional vector with `INTEGER` values.
69
-
It returns the `VECTOR` itself, and the xref:functions/scalar.adoc#functions-valuetype[`valueType()`] function is used to return information about its type.
70
68
71
69
.Construct a `VECTOR` value
72
70
[source, cypher]
@@ -76,15 +74,40 @@ RETURN vector, valueType(vector) AS vectorType
| [1, 2, 3] | "VECTOR<INTEGER NOT NULL>(3) NOT NULL"
81
+
| vector([1, 2, 3], 3, INTEGER NOT NULL)
84
82
85
-
2+d|Rows: 1
83
+
1+d|Rows: 1
86
84
|===
87
85
86
+
[IMPORTANT]
87
+
====
88
+
If you try to return a `VECTOR` value using a link:{neo4j-docs-base-uri}/create-applications/[driver] on a version older than 6.0, the `VECTOR` value will be replaced by a placeholder `MAP` value.
89
+
A warning will also be attached.
90
+
91
+
.Returning a `VECTOR` value with a driver older than 6.0
warn: One or more values returned could not be handled by this version of the driver and were replaced with placeholder map values. Please upgrade your driver!
107
+
03N95 (Neo.ClientNotification.UnknownType)
108
+
----
109
+
====
110
+
88
111
The following example uses a parameter containing a `LIST<INTEGER>` as input to `vectorValue`.
89
112
90
113
.Parameters
@@ -99,17 +122,17 @@ The following example uses a parameter containing a `LIST<INTEGER>` as input to
0 commit comments