[Feature] Support hybrid search with rrf, weighted_score and mrr rankers
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
Start with the Java HybridSearchBuilder and HybridSearchRanker design described in the issue, then inspect the existing table-level full-text search work in #404 and vector-search prerequisite. Implement the rankers, route validation, builder, and snapshot behavior described here, with tests for ranking, ties, weights, empty routes, validation, and snapshot pinning; primary-key support also depends on #410.
索引モデルが issue の本文から書いたものです。
説明
Search before asking
- I searched in the issues and found nothing similar.
Motivation
Sub-issue of #399 (step 4: hybrid search).
Java Table#newHybridSearchBuilder() combines vector and full-text routes into one ranked result. It was built up over several PRs: apache/paimon#8271, apache/paimon#8288, apache/paimon#8294, apache/paimon#8324, apache/paimon#8327, apache/paimon#8336, apache/paimon#8348 and apache/paimon#8351. Paimon C++ has neither a hybrid search API nor a table-level vector search builder.
Java design:
-
Builder.
HybridSearchBuilder(HybridSearchBuilderImpl) provides:withPartitionFilter,withFilteraddVectorRoute(column, vector, limit[, weight[, options]]); the weight defaults to 1.0addFullTextRoute(field, query, limit, weight)withLimitwithRanker(String),withRrfRanker(),withWeightedScoreRanker()executeLocal()
All routes are pinned to one snapshot, and the filters are forwarded to every route. Full-text routes accept row filters since apache/paimon#9855.
-
Routes.
HybridSearchRouteis eitherVECTORorFULL_TEXT.- Weights must be finite and greater than 0.
- Full-text routes reject route options.
- The route builder rejects mixing vector and full-text settings.
-
Rankers.
HybridSearchRankernormalizes the ranker name: blank meansrrf; otherwise the name is trimmed and lower-cased.rrf: Σ weight / (60 + rank + 1). Ties are broken by score descending, then row id ascending.weighted_score: min-max normalize each route's scores to [0, 1] (all 1.0 when the range is 0), then compute Σ weight × normalized score.mrr: Σ weight / (rank + 1).- The final top-k uses a heap.
-
Primary-key tables. They rank physical positions with
PrimaryKeySearchRanker.weightedRrf,weightedScoreandweightedMrr. Mixing primary-key physical results with global row-id results is rejected.
Solution
- Port the rankers and route validation. They are self-contained and can land first with unit tests.
- Add the hybrid search builder on top of the table-level full-text search (#404) and a table-level vector search builder.
- Add tests:
- each ranker
- tie-breaking
- weights
- an empty route result
- route validation
- snapshot pinning across routes
Anything else?
- Prerequisite: a table-level vector search builder (Java
VectorSearchBuilder/ scan / read). It does not exist in Paimon C++ yet, and could be tracked separately or delivered as part of this issue. - Depends on #404. Primary-key hybrid search depends on #410.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- 主要言語
- C++
- スター
- 65
- フォーク
- 31
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 64
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/paimon-cpp のほかの issue
-
[Feature] Support writing MAP<K, BLOB> fields対応中かも @SteNicholas が 1 日前に担当しました。 オープンenhancement
apache/paimon-cpp#415 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/paimon-cpp#410 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
apache/paimon-cpp#409 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/paimon-cpp#408 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/paimon-cpp#406 ·
メンテナーはふだん 1 日以内に返信
apache/paimon-cpp の issue をすべて見る
似ている issue
-
HasBacktrace Priority-Critical
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
azerothcore/azerothcore-wotlk#27921 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
yhirose/cpp-peglib#344 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
ExpressLRS/ExpressLRS#3805 ·
メンテナーはふだん 2 日以内に返信