Skip to content

Commit

Permalink
document vector creation
Browse files Browse the repository at this point in the history
  • Loading branch information
swilly22 committed May 1, 2024
1 parent c80a245 commit 1a5aa03
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cypher/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,17 @@ CREATE VECTOR INDEX FOR ()-[e:Call]->() ON (e.summary) OPTIONS {dimension:128, s
Please note when creating a vector index both the vector dimension and similarity function
must be provided. At the moment the only supported similarity function is 'euclidean'.

## Inserting vectors

To create a new vector use the [vecf32](https://docs.falkordb.com/cypher/functions.html#vector-functions) function
as follows:

```cypher
CREATE (p: Product {description: vecf32([2.1, 0.82, 1.3])})
```

The above query creates a new `Product` node with a `description` attribute containing a vector.

## Query vector index

Vector indices are used to search for similar vectors to a given query vector
Expand Down Expand Up @@ -269,4 +280,4 @@ For example to drop the vector index over Product description invoke:

```cypher
DROP VECTOR INDEX FOR (p:Product) ON (p.description)
```
```

0 comments on commit 1a5aa03

Please sign in to comment.