Skip to content

docs: db.index.vector.queryNodes filters after the top-k; vector.neighbors where/filter filter before it (ArcadeData/arcadedb#10685) - #506

Merged
robfrank merged 2 commits into
ArcadeData:mainfrom
tae898:docs/10685-queryNodes-filters-after-top-k
Oct 28, 2026
Merged

robfrank merged 2 commits into
ArcadeData:mainfrom
tae898:docs/10685-queryNodes-filters-after-top-k

Conversation

@tae898

@tae898 tae898 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Fixes ArcadeData/arcadedb#10685.

The Cypher vector-search pages never said that db.index.vector.queryNodes has no filter, so a WHERE after its YIELD runs on the k nodes it returned. This adds that sentence, and the pre-filtered form, to the Cypher procedure table in cypher-clauses.adoc and to the Cypher section of vector.adoc: CALL vector.neighbors(..., { where: { ... } }) (since 26.11.1) or the filter option, with one where example. The table row for vector.neighbors now shows the options argument and links to the SQL function.

Checked on a 26.11.1-SNAPSHOT build of ArcadeData/arcadedb main (c69898d) with 50 vectors, 10 of tenant a far from the query and 40 of tenant b near it, k = 5:

Cypher rows
CALL db.index.vector.queryNodes('Fact[embedding]', 5, $q) YIELD node, score WITH node, score WHERE node.tenant = 'a' 0
CALL vector.neighbors('Fact[embedding]', $q, 5, {where: {tenant: 'a'}}) YIELD tenant, distance 5, all tenant a
CALL vector.neighbors('Fact[embedding]', $q, 5, {filter: [$rid]}) YIELD tenant, distance 1 (the one RID given)

docs-validator.py reports the same three broken cross-references as on main, none from these lines.

🤖 Generated with Claude Code

…tor.neighbors where/filter filter before it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@tae898 tae898 changed the title docs(#10685): db.index.vector.queryNodes filters after the top-k; vector.neighbors where/filter filter before it docs: db.index.vector.queryNodes filters after the top-k; vector.neighbors where/filter filter before it (ArcadeData/arcadedb#10685) Oct 26, 2026
…lter} map since 26.11.1

Engine commit 81c30122fc (ArcadeData/arcadedb#10808) added the fourth
argument after this PR was written, so the note that queryNodes has no
filter is no longer true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robfrank
robfrank merged commit e0e2671 into ArcadeData:main Oct 28, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cypher: db.index.vector.queryNodes filters only after the top-k; point users to vector.neighbors with where/filter (docs), or accept a filter argument

2 participants