Repository navigation
Text index: rename positions to support_phrase_search - #109900
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Workflow [PR], commit [e5e4447] Summary: ✅
AI ReviewSummaryThis PR renames the experimental text-index parameter and gate from Findings❌ Blockers
Final VerdictStatus: ❌ Block Minimum required actions:
|
positions into explicit support_phrase_searchpositions to support_phrase_search
| static const String ARGUMENT_POSTING_LIST_BLOCK_SIZE = "posting_list_block_size"; | ||
| static const String ARGUMENT_POSTING_LIST_CODEC = "posting_list_codec"; | ||
| static const String ARGUMENT_POSITIONS = "positions"; | ||
| static const String ARGUMENT_POSITIONS = "support_phrase_search"; |
There was a problem hiding this comment.
This drops the old positions key entirely. Existing table metadata created before this rename will still contain INDEX ... TYPE text(..., positions = 1), and here extractFieldOption no longer consumes that argument, so textIndexValidator / textIndexCreator fall through to Unexpected text index arguments: positions during restart or ATTACH.
Please keep accepting positions as a compatibility spelling here (normalizing it to support_phrase_search internally) so upgrades do not stop loading already-created text indexes.
| DECLARE(Bool, allow_experimental_text_index_positions, false, R"( | ||
| Allow creating text indexes with the experimental `positions` argument which | ||
| stores token positions to support exact phrase matching. | ||
| DECLARE(Bool, allow_experimental_text_index_phrase_search, false, R"( |
There was a problem hiding this comment.
Renaming the MergeTree setting without an alias is backward-incompatible for stored CREATE TABLE ... SETTINGS allow_experimental_text_index_positions = 1 metadata and for automation/backups that still emit the old name. MergeTreeSettings will now treat that as unknown, so tables created on the previous release stop attaching after upgrade.
This needs a compatibility alias, e.g. a DECLARE_WITH_ALIAS that keeps allow_experimental_text_index_positions resolving to allow_experimental_text_index_phrase_search.
| add_missing_param("posting_list_block_size", UInt64(fuzz_rand() % 2048 + 1)); | ||
| add_missing_param("posting_list_codec", String(pickRandomly(fuzz_rand, posting_list_codecs))); | ||
| /// `positions = 1` requires the `allow_experimental_text_index_positions` MergeTree setting. | ||
| /// `support_phrase_search = 1` requires the `allow_experimental_text_index_phrase_search` MergeTree setting. |
There was a problem hiding this comment.
The comment is renamed, but the generated parameter is still positions. After MergeTreeIndexText stops accepting that spelling, this path only generates invalid text-index DDL instead of exercising support_phrase_search, so the renamed surface loses QueryFuzzer coverage.
Both the param_id->name() branch above and this add_missing_param call need to switch to support_phrase_search.
| {"allow_commit_order_projection", trueOrFalseSetting}, | ||
| {"allow_experimental_replacing_merge_with_cleanup", trueOrFalseSetting}, | ||
| {"allow_experimental_text_index_positions", trueOrFalseSetting}, | ||
| {"allow_experimental_text_index_phrase_search", trueOrFalseSetting}, |
There was a problem hiding this comment.
TableSettings now enables allow_experimental_text_index_phrase_search, but src/Client/BuzzHouse/Generator/SQLTable.cpp:2029 still emits positions = ... for text indexes. That leaves BuzzHouse generating DDL with the new gate and the old index argument, which now fails validation instead of covering phrase-search indexes.
Please rename the generator output there to support_phrase_search as well.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 24/24 (100.00%) · Uncovered code |
|
Hi @ahmadov @rschu1ze — while reviewing this PR I found the following:
Happy to discuss — close anything that's wrong or already addressed. |
…n attach ClickHouse#109900 renamed the text-index argument positions to support_phrase_search without a compatibility alias. A table written by an older server with positions = 0/1 in its text index leaves positions unrecognized and fails on attach with 'Unexpected text index arguments: positions' from textIndexCreator/textIndexValidator, which is a different code path than the already-filtered 'Unknown setting' message. The previous-release corpus of 02346_text_index_partially_materialized creates exactly this shape. Allow-list the exact legacy argument message in the upgrade error grep, narrowed to the exact name so genuinely unexpected text index arguments are not masked. Co-Authored-By: Claude Opus 4.8 <[email protected]>
PR ClickHouse#109900 (merged 2026-07-13) renamed the setting allow_experimental_text_index_positions to allow_experimental_text_index_phrase_search and the text index argument positions to support_phrase_search. Update this regression test's SQL accordingly; the C++ fix is unaffected. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…earch-rename Text index: rename `positions` to `support_phrase_search`
PR ClickHouse#109900 (merged 2026-07-13) renamed the setting allow_experimental_text_index_positions to allow_experimental_text_index_phrase_search and the text index argument positions to support_phrase_search. Update this regression test's SQL accordingly; the C++ fix is unaffected. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Rename text index parameter
positionstosupport_phrase_search.Version info
26.7.1.847(included in26.7and later)