[Feature] Support hybrid search with rrf, weighted_score and mrr rankers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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!
- Lingua principale
- C++
- Stelle
- 66
- Fork
- 33
- Merge medio
- 2g 52m
- PR unite (30g)
- 54
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/paimon-cpp
-
[Feature] Read blob-view dependency tables through a catalog with X-Paimon-Read-ViaForse già presa @lucasfang l’ha presa 2 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
apache/paimon-cpp#426 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
apache/paimon-cpp#410 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
apache/paimon-cpp#409 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
apache/paimon-cpp#408 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
apache/paimon-cpp#406 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/paimon-cpp
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
mudler/parakeet.cpp#99 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
raspberrypi/rpi-imager#1773 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
duckdb/duckdb-wasm#2267 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
AcademySoftwareFoundation/Imath#611 ·
I maintainer di solito rispondono entro 1 giorno
-
question
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100