Load each node's nearest neighbours among a set of ids, in one statement on every store (port of drivine4j#232)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by reading the existing loadNearest implementation and the backend hooks for each store; the issue names no files or tests to begin from. Port the NearestAmongCrossEngineTest dataset and cases from drivine4j, then implement the fragment, view, and Python sync and async forms across the listed stores. Done means the cross-store cases pass, including score parity, ordering, validation, and the documented refusals.
索引モデルが issue の本文から書いたものです。
説明
Port of liberation-data/drivine4j#232.
What it does: for each of a set of node ids, return its nearest neighbours among that same set, in one statement on every store. Callers currently write this as an UNWIND over the ids with Neo4j's vector procedure per seed, which runs only on Neo4j.
Shape (drivine4j): loadNearestAmong(graphClass, ids, topK, threshold?, property?, searchK?): Map<id, List<Scored<id>>>.
- Keys: each id whose node has the embedding, in the order given. Ids are deduplicated; an unknown id, or one with no embedding (or a wrong-size one where the store leaves it out), is not a key.
- Values: up to
topKother ids from the set, never the id itself, most similar first. Each carries the scoreloadNearestgives that pair on the store. Results belowthresholdare dropped. searchK: the candidates an approximate index is asked for per seed. It defaults totopK + 1, and asearchKbelowtopKis refused.- Refusal: an empty set still validates the class and property before returning
{}. - Shapes: works on a fragment and on a view; Python sync and async forms (the root fragment's embedding).
Backend hook: nearestAmong(class, property, ids, topK, threshold, searchK), returning one row per seed, {seed, near: [{id, score}]}.
Per store:
| Store | How |
|---|---|
| Neo4j | UNWIND $ids, match each seed, db.index.vector.queryNodes with the seed's own embedding; always rescore exactly with vector.similarity.*, since the result is always trimmed |
| FalkorDB | the same with db.idx.vector.queryNodes; pass the stored vector as it is, without vecf32(), which takes only a list |
| Memgraph | the same with vector_search.search |
| Postgres | the seeds in a CTE; per seed the pgvector index's nearest joined back to the set, or every same-size seed measured when no index is made |
| Oracle | the seeds in a CTE with ROW_NUMBER; with an index, CROSS APPLY (… FETCH APPROX FIRST searchK) over its side table; with none, every same-size pair measured |
| Neptune | refused, as loadNearest is |
The Cypher vector head needs to take its vector from an expression and carry variables through its closing WITH.
Tests to port: drivine4j's NearestAmongCrossEngineTest, with its data set: A, B, C, D in one plane; X outside the set; E with no embedding; Z unknown. It covers:
- results only from the set, an outsider and the seed absent;
- the
topKcap and the threshold cut; - absent keys;
- scores equal to
loadNearest's; - a view against its fragment, and naming the property;
- key order and the
searchKshortfall; - refusals.
- 主要言語
- Python
- スター
- 1
- フォーク
- 0
- 平均マージ
- 1時間 16分
- マージ済み PR(30日)
- 74
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
liberation-data/drivine-python のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
liberation-data/drivine-python#154 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
liberation-data/drivine-python#152 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
liberation-data/drivine-python#150 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
liberation-data/drivine-python#138 ·
メンテナーはふだん 1 日以内に返信
-
Cypher on SQL stores: all(), any(), none() and single() are two-valued where the predicate is nullオープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
liberation-data/drivine-python#159 ·
メンテナーはふだん 1 日以内に返信
liberation-data/drivine-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NVIDIA/flare-local-inference#90 ·
メンテナーはふだん 1 日以内に返信
-
area/streaming comp/gateway P2 platform/telegram type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#144897 ·
メンテナーはふだん 1 日以内に返信
-
request-theme
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
LizardByte/ThemerrDB#9575 ·
メンテナーはふだん 1 日以内に返信
-
author-page correction
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
acl-org/acl-anthology#10599 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zilliztech/memsearch#818 ·
メンテナーはふだん 1 日以内に返信