[Feature] Support hybrid search with rrf, weighted_score and mrr rankers
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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 天 14 小时
- 30 天内合并 PR
- 60
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/paimon-cpp 的其他 Issue
-
[Feature] Warm up next data file in ConcatBatchReader可能已有人在做 @SteNicholas 于 1 天前认领。 未关闭enhancement
apache/paimon-cpp#419 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Feature] Derive Parquet data file stats from in-memory writer metadata instead of re-reading footer可能已有人在做 @SteNicholas 于 1 天前认领。 未关闭enhancement
apache/paimon-cpp#417 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Feature] Support writing MAP<K, BLOB> fields可能已有人在做 @SteNicholas 于 3 天前认领。 未关闭enhancement
apache/paimon-cpp#415 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
apache/paimon-cpp#410 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
apache/paimon-cpp#409 ·
维护者通常 1 天内回复
查看 apache/paimon-cpp 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
MerginMaps/mobile#4741 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
Icinga/icinga2#11077 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
-
agent:WSL bug linux LOW ui
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
Copter: PosHold brake-entry threshold became 16 deg instead of 0.16 deg after the radians conversion可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 78/100
ArduPilot/ardupilot#34617 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复