You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: vector.neighbors 'where' predicate so a property restriction does not build the set of every RID in scopeĀ #10169
Follow-up of #10129 (proposed change 4, marked optional there).
The idiomatic way to restrict vector.neighbors by a property is a filter subquery that returns every RID in scope:
`vector.neighbors`('Passage[embedding]', :embedding, :fetch,
{ filter: (SELECT @rid FROM Passage WHERE embed_space = :space).@rid })
That loads every record in scope and builds a HashSet<RID> on each call: 3-5 ms on 11k rows in the #10129 measurement, even when the filter keeps everything.
Proposal: accept a property predicate applied to candidates during the search, e.g. where: { embed_space: :space } (equality map) or a SQL condition string, evaluated on each candidate record the search already loads, so restricting by a property no longer means materializing the set of every RID in scope. Same option for vector.sparseNeighbors.
Out of scope for #10129, which fixed the record loads and per-row copies in vector.fuse / vector.rerank; this is a new option on the search API (parser, OpenAPI, docs).
Added in #10185 (26.11.1): vector.neighbors and vector.sparseNeighbors take a where option. It is tested only on the candidates the search visits, so nothing is built up front for the whole type:
It takes a map of property to value, or a SQL condition with named parameters (? is refused), and it can be combined with filter. A very selective predicate may end up testing every record to return k results; for a small, known set of RIDs, filter is still the cheaper choice.
ā¤ļø Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
Activity
Merge pull request #10185 from ArcadeData/worktree-arcadedb-10184-101ā¦
lvca commentedon Oct 17, 2026
Added in #10185 (26.11.1):
vector.neighborsandvector.sparseNeighborstake awhereoption. It is tested only on the candidates the search visits, so nothing is built up front for the whole type:It takes a map of property to value, or a SQL condition with named parameters (
?is refused), and it can be combined withfilter. A very selective predicate may end up testing every record to returnkresults; for a small, known set of RIDs,filteris still the cheaper choice.ā¤ļø Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
perf(ArcadeData#10170 ArcadeData#10169): vector rerankers reuse carriā¦
perf(#10170 #10169): vector rerankers reuse carried records and overrā¦