Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
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
13 changes: 7 additions & 6 deletions src/content/docs/extensions/vector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,11 @@ result = conn.execute(
'open-ai', 'text-embedding-3-small',
384
),
2
$limit
)
RETURN node.title ORDER BY distance;
""")
""",
{"limit": 2})

print(result.get_as_pl())
```
Expand Down Expand Up @@ -364,9 +365,9 @@ result = conn.execute(
MATCH (n)-[:PublishedBy]->(p:Publisher)
RETURN p.name AS publisher, n.title AS book, distance
ORDER BY distance
LIMIT 5;
LIMIT $limit;
""",
{"query_vector": query_vector})
{"query_vector": query_vector, "limit": 2})
print(result.get_as_pl())
```
The above query asks for the 2 nearest neighbors of the query vector "quantum machine learning".
Expand Down Expand Up @@ -440,7 +441,7 @@ result = conn.execute("""
'filtered_book',
'book_title_index',
$query_vector,
2
$limit
)
WITH node AS n, distance as dist
MATCH (n)-[:PublishedBy]->(p:Publisher)
Expand All @@ -449,7 +450,7 @@ result = conn.execute("""
p.name AS publisher
ORDER BY dist;
""",
{"query_vector": query_vector})
{"query_vector": query_vector, "limit": 2})
print(result.get_as_pl())
```
</TabItem>
Expand Down