Skip to content

Commit 95cb626

Browse files
fix examples and polish
1 parent 599cfe3 commit 95cb626

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

modules/ROOT/pages/expressions/predicates/type-predicate-expressions.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,16 @@ Cypher will therefore regard any exact numerical parameter as an `INTEGER` regar
305305
For example, an `INT16` or an `INT32` passed through from a link:https://neo4j.com/docs/create-applications/[language library] will both be treated by Cypher as an `INTEGER`.
306306
Note that any exact numerical parameter used must fit within the range of an `INT64`.
307307

308-
[source, cypher, role=test-skip]
308+
////
309+
[source, parameters]
310+
----
311+
{
312+
"int16param": 65537
313+
}
314+
----
315+
////
316+
317+
[source, cypher]
309318
----
310319
RETURN $int16param IS :: INTEGER AS isInteger
311320
----

modules/ROOT/pages/functions/vector.adoc

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ This includes the potential of lossy conversion in cases where a larger type, e.
3939
.Query
4040
[source, cypher]
4141
----
42-
WITH vector([1, 2, 3], 3, INTEGER) AS vector
43-
RETURN vector
42+
RETURN vector([1, 2, 3], 3, INTEGER) AS vector
4443
----
4544
4645
.Result
@@ -61,8 +60,7 @@ RETURN vector
6160
.Query
6261
[source, cypher]
6362
----
64-
WITH vector("[1.05000e+00, 0.123, 5]", 3, FLOAT32) as vector
65-
RETURN vector
63+
RETURN vector("[1.05000e+00, 0.123, 5]", 3, FLOAT32) AS vector
6664
----
6765
6866
.Result
@@ -183,6 +181,16 @@ CREATE
183181
Given a parameter `query` (here set to `[4.0, 5.0, 6.0]`), you can query for the two nearest neighbors by Euclidean distance.
184182
This is achieved by matching on all candidate vectors and ordering by the similarity score:
185183
184+
////
185+
.Parameters
186+
[source, parameters]
187+
----
188+
{
189+
"query": [4.0, 5.0, 6.0]
190+
}
191+
----
192+
////
193+
186194
[source, cypher]
187195
----
188196
MATCH (node:Node)
@@ -200,10 +208,10 @@ This returns the two nearest neighbors.
200208
| node
201209
| score
202210
203-
| (:Node {vector: [2.0, 8.0, 3.0], id: 3})
211+
| (:Node {vector: vector([2.0, 8.0, 3.0], 3, FLOAT32 NOT NULL), id: 3})
204212
| 0.043478261679410934
205213
206-
| (:Node {vector: [1.0, 4.0, 2.0], id: 1})
214+
| (:Node {vector: vector([1.0, 4.0, 2.0], 3, FLOAT32 NOT NULL), id: 1})
207215
| 0.03703703731298447
208216
209217
2+d|Rows: 2

modules/ROOT/pages/values-and-types/vector.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
= Vectors
2-
:description: Information about Cypher's `VECTOR` type.
2+
:description: Create and store vectors (embeddings) as properties on nodes and relationships, and use them for efficient semantic retrieval with vector indexes and the GenAI plugin.
33
:page-role: new-neo4j-2025.10
44

55
`VECTOR` values can be created and stored as xref:indexes/semantic-indexes/vector-indexes.adoc#embeddings[embedding] properties on nodes and relationships, and used for efficient semantic retrieval using xref:indexes/semantic-indexes/vector-indexes.adoc[vector indexes] and the xref:genai-integrations.adoc[GenAI plugin].
66
`VECTOR` values can also be measured and compared (in terms of similarity, distance, and norm) using xref:functions/vector.adoc[vector functions].
77

8+
89
[[vector-type]]
910
== The vector type
1011

@@ -57,8 +58,7 @@ To construct a `VECTOR` value, use the xref:functions/vector.adoc#functions-vect
5758
.Query
5859
[source, cypher]
5960
----
60-
WITH vector([1, 2, 3], 3, INTEGER) AS vector
61-
RETURN vector
61+
RETURN vector([1, 2, 3], 3, INTEGER) AS vector
6262
----
6363
6464
.Result
@@ -87,8 +87,7 @@ RETURN vector
8787
.Query
8888
[source, cypher]
8989
----
90-
WITH vector($integerList, 5, INTEGER8) as vector
91-
RETURN vector
90+
RETURN vector($integerList, 5, INTEGER8) AS vector
9291
----
9392
9493
.Result

0 commit comments

Comments
 (0)