Repository navigation
feat(file-index): support basic vector and full-text search - #372
Merged
lxy-9602 merged 9 commits intoOct 13, 2026
Merged
Conversation
zjw1111
marked this pull request as draft
September 18, 2026 05:19
zjw1111
force-pushed
the
codex/file-index-vector-full-text-search
branch
from
October 8, 2026 06:09
5eefab6 to
718fa3e
Compare
zjw1111
marked this pull request as ready for review
October 8, 2026 06:10
zjw1111
force-pushed
the
codex/file-index-vector-full-text-search
branch
from
October 8, 2026 08:10
338fbe6 to
0bcceba
Compare
lxy-9602
reviewed
Oct 9, 2026
lxy-9602
reviewed
Oct 9, 2026
lxy-9602
reviewed
Oct 9, 2026
lxy-9602
reviewed
Oct 9, 2026
lszskye
reviewed
Oct 10, 2026
Collaborator
|
+1 |
SteNicholas
added a commit
to SteNicholas/paimon-cpp
that referenced
this pull request
Oct 13, 2026
Align FullTextSearch with org.apache.paimon.predicate.FullTextSearch: - Make FullTextSearch take a field name, a JSON DSL query, a positive limit and optional include_row_ids, which replaces pre_filter. Remove SearchType, with_score, min_score and ReplacePreFilter. - Add FullTextSearch::OffsetRange(from, to), which clips include_row_ids to a shard range and shifts them to local row ids, and use it in OffsetGlobalIndexReader. - Make GlobalIndexReader::VisitFullTextSearch return ScoredGlobalIndexResult and drop the unscored and min_score paths of the full-text reader. - Translate match, multi_match, match_phrase and boolean queries into Lucene queries in the lucene-fts reader, validating them as the paimon-full-text engine does. Reject boost queries and fuzzy matching, and remove prefix, wildcard and unlimited Lucene searches. Parse queries without recursion and reject queries that nest more than 127 JSON arrays and objects, as serde_json does in the engine. - Move file index full-text reads from apache#372 to include_row_ids, and reject a file full-text read that projects _INDEX_SCORE in place of its with_score check. - Update tests and global index docs, and document that limit applies to each index shard until apache#402 adds a global top-k. Closes apache#401.
SteNicholas
added a commit
to SteNicholas/paimon-cpp
that referenced
this pull request
Oct 13, 2026
Align FullTextSearch with org.apache.paimon.predicate.FullTextSearch: - Make FullTextSearch take a field name, a JSON DSL query, a positive limit and optional include_row_ids, which replaces pre_filter. Remove SearchType, with_score, min_score and ReplacePreFilter. - Add FullTextSearch::OffsetRange(from, to), which clips include_row_ids to a shard range and shifts them to local row ids, and use it in OffsetGlobalIndexReader. - Make GlobalIndexReader::VisitFullTextSearch return ScoredGlobalIndexResult and drop the unscored and min_score paths of the full-text reader. - Translate match, multi_match, match_phrase and boolean queries into Lucene queries in the lucene-fts reader, validating them as the paimon-full-text engine does. Reject boost queries and fuzzy matching, and remove prefix, wildcard and unlimited Lucene searches. Parse queries without recursion and reject queries that nest more than 127 JSON arrays and objects, as serde_json does in the engine. - Use include_row_ids in file index full-text reads from apache#372, and replace their with_score check by rejecting reads that project _INDEX_SCORE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: #361
_INDEX_SCOREcolumns, keeping scores aligned with selected physical rows across files and batches.Current scope: search limits are applied per data file. Full-text backend implementation (including Tantivy File Index), full-text score output, Predicate + Search combinations, Merge-on-Read Search, and cross-file TopK merging are deferred to follow-up work.
Tests
Focused local validation during development used the existing Debug/ASan build, not the complete test suite:
cmake --build build --target paimon-core-test paimon-common-test paimon-write-and-read-inte-test -j 64./build/debug/paimon-core-test --gtest_filter='FieldMappingTest.*:FileIndexOptionsTest.*:FileIndexEvaluatorTest.*:*FileIndexSearchEvaluatorTest.*:RawFileSplitReadTest.*'./build/debug/paimon-common-test --gtest_filter='FileIndexFormatTest.*'./build/debug/paimon-write-and-read-inte-test --gtest_filter='*TestLuminaVectorIndexAfterCompaction*:*TestLuminaSearchAfterRenameAcrossSchemaVersions*'pre-commiton the changed files andgit diff --checkpassed.API and Format
ReadContextBuilder::SetVectorSearchandSetFullTextSearch.FileIndexReader::VisitVectorSearchandVisitFullTextSearch, plusScoredFileIndexResultfor file-local row positions and aligned vector scores._INDEX_SCOREprojection without implicitly changing the output schema.FileIndexFormat::CreateReaderinstead of using Arrow schema metadata. Options and search requests reaching File Index readers use file field names.Documentation
API comments describe the search requests and score projection, with follow-up capabilities distinguished from the current implementation. No standalone user guide is included in this PR.
Generative AI tooling
Generated-by: OpenAI Codex (GPT-5).