From 431a02de04a96afaa61e8672a5478ededd627144 Mon Sep 17 00:00:00 2001 From: Avi Avni Date: Mon, 19 Aug 2024 12:45:16 +0300 Subject: [PATCH 1/2] document new vector api --- cypher/functions.md | 1 + cypher/index.md | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/cypher/functions.md b/cypher/functions.md index 21bde7a..bb97328 100644 --- a/cypher/functions.md +++ b/cypher/functions.md @@ -214,6 +214,7 @@ This section contains information on all supported functions from the Cypher que | ----------------------------------------- | :----------| | vecf32(_array_) | Creates a new float 32 vector
all elements of input array must be of type float | | vec.euclideanDistance(_vector_, _vector_) | Returns the Euclidean distance between the two input vectors | +| vec.cosineDistance(_vector_, _vector_) | Returns the Cosine distance between the two input vectors | ### List comprehensions diff --git a/cypher/index.md b/cypher/index.md index 1aba5c3..fad2791 100644 --- a/cypher/index.md +++ b/cypher/index.md @@ -199,6 +199,17 @@ To create this type of index use the following syntax: CREATE VECTOR INDEX FOR ON OPTIONS ``` +The options are: +``` +{ + dimension: INT, // Requiered, length of the vector to be indexed + similarityFunction: STRING, // Requiered, currently only euclidean is allowed + M: INT, // Optional, maximum number of outgoing edges per node. default 16 + efConstruction: INT, // Optional, number of candidates during construction. default 200 + efRuntime: INT // Optional, number of candidates during search. default 10 +} +``` + For example, to create a vector index over all `Product` nodes `description` attribute use the following syntax: From 438cb58bfb2907913e21a834d81814659a498091 Mon Sep 17 00:00:00 2001 From: Avi Avni Date: Mon, 19 Aug 2024 13:04:00 +0300 Subject: [PATCH 2/2] add word --- .wordlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.wordlist.txt b/.wordlist.txt index 16e44ae..b0dc36d 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -252,6 +252,7 @@ yaml uri vec euclideanDistance +cosineDistance vecf Dani Dovizioso