Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions pages/querying/vector-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ The following options apply to both single-store vector indexes (nodes) and vect
If resizing fails due to memory limitations, an exception will be thrown. Default value is `2`.
- `scalar_kind: string (default=f32)` ➡ The [scalar kind](#scalar-kind) used to store each vector component. Smaller types reduce memory usage but may decrease precision.


### Using parameters for configuration

The `WITH CONFIG` map accepts query parameters, both for the whole map and for individual values. This lets a client supply the configuration at query time without rebuilding the Cypher string.

Pass the entire config as a parameter:

```cypher
CREATE VECTOR INDEX idx ON :Label(embedding) WITH CONFIG $config;
```

with `$config` bound by the client to a map such as `{dimension: 128, capacity: 1000, metric: "cos"}`.

Or parameterize individual values:

```cypher
CREATE VECTOR INDEX idx ON :Label(embedding) WITH CONFIG {"dimension": $dim, "capacity": $cap};
```

Both forms work for `CREATE VECTOR INDEX` and `CREATE VECTOR EDGE INDEX`.

### Using a function for configuration

Instead of a static map literal, you can pass a **query module function** that returns the configuration map. This lets you centralize index configurations and reuse them across queries.
Expand Down