SteNicholas opened a new pull request, #590:
URL: https://github.com/apache/paimon-cpp/pull/590

   ### Purpose
   
   Linked issue: close #407
   
   Support hybrid search on Data Evolution tables in Paimon C++, following 
Paimon Java. Vector and full-text routes search one snapshot with shared 
partition and row filters. The fused row IDs and scores can drive a table scan 
that exposes `_INDEX_SCORE`.
   
   - Add `VectorSearchBuilder`, `VectorScan` and `VectorRead` for table-level 
vector top-k. Query shards in parallel, convert Lumina distances to similarity 
scores and retain the selected snapshot metadata in reusable plans.
   - Add `HybridSearchBuilder` with weighted vector and full-text routes, 
per-route candidate limits and a final top-k. Forward vector query options to 
the backend and resolve columns against the selected schema.
   - Use scalar indexes to narrow candidates before ranking. Verify inexact 
candidates against table data when configured and oversample vector hits when 
scalar indexes cannot evaluate the filter.
   - Apply deletion vectors before ranking and skip vector shards without 
eligible live rows. Reuse the full-text search paths for indexed hits and gaps 
in index coverage.
   - Fuse hits by row ID with `rrf`, `weighted_score` and `mrr`. Keep the final 
top-k in a heap and break score ties by ascending row ID.
   
   Table-level vector search supports `fast` mode. Full-text routes support 
`fast`, `full` and `detail`.
   
   ### Tests
   
   - Ranker tests for the three fusion formulas, route weights, score 
normalization, tie-breaking, empty routes and invalid weights.
   - Builder tests for route validation, partition and row filters, route 
options and limits, concurrent shard queries, scalar prefiltering and vector 
post-filtering.
   - Snapshot tests for historical field IDs, plan reuse after snapshot expiry 
and a commit between vector and full-text route searches.
   - Lumina and full-text integration tests for global vector top-k, fused 
`_INDEX_SCORE` reads, deletion vectors and full-text search over index coverage 
gaps. Lumina unit tests cover native and similarity scores across distance 
metrics.
   
   ### API and Format
   
   - Add `Table::NewVectorSearchBuilder()`, `Table::NewHybridSearchBuilder()`, 
the vector scan and read interfaces, and `HybridSearchRanker`. Expose vector 
search capability through `GlobalIndexer` and similarity-score requests through 
`VectorSearch`.
   - Search reads the existing table, global index and deletion-vector file 
formats.
   
   ### Documentation
   
   Yes. `docs/source/user_guide/global_index.rst` and 
`docs/source/api/global_index.rst` cover vector and hybrid search, route 
configuration, filtering, snapshot selection, rankers and reading the fused 
scores.
   
   ### Generative AI tooling
   
   Generated-by: OpenAI Codex (GPT-6)
   
   🤖 Generated with [OpenAI Codex](https://openai.com/codex/)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to