From 62846f95c97589f469f231ea767a45cd47ca7f8f Mon Sep 17 00:00:00 2001 From: Eunbin Son Date: Thu, 6 Aug 2026 14:47:53 +0900 Subject: [PATCH] [docs] Fix full-text index option defaults and search query examples The primary-key full-text search examples pass the column inside the query JSON, which the native reader rejects with "invalid query: full-text query column 'content' is not configured for this index". The Paimon column is supplied as the procedure/API argument instead. The paimon-full-text README analyzer table, which the primary-key global index docs delegate to, still carries the pre-full-text defaults: stem, remove-stop-words and ascii-folding are true, and ngram.min-gram/max-gram default to 3. Generated-by: Claude Code --- docs/docs/flink/procedures.md | 2 +- docs/docs/primary-key-table/global-index.mdx | 6 +++--- paimon-full-text/README.md | 16 +++++++++------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/docs/flink/procedures.md b/docs/docs/flink/procedures.md index e3039f69b380..57772549f1d3 100644 --- a/docs/docs/flink/procedures.md +++ b/docs/docs/flink/procedures.md @@ -1164,7 +1164,7 @@ All available procedures are listed below. CALL sys.full_text_search(
`table` => 'default.articles',
`column` => 'content',
- query => '{"match":{"column":"content","terms":"paimon lake"}}',
+ query => '{"match":{"query":"paimon lake"}}',
top_k => 10,
projection => 'id,content,__paimon_search_score') diff --git a/docs/docs/primary-key-table/global-index.mdx b/docs/docs/primary-key-table/global-index.mdx index db6ebe00d1ed..b96341e7b1ec 100644 --- a/docs/docs/primary-key-table/global-index.mdx +++ b/docs/docs/primary-key-table/global-index.mdx @@ -414,7 +414,7 @@ SELECT id, content, __paimon_search_score FROM full_text_search( 'items', 'content', - '{"match":{"column":"content","terms":"paimon lake"}}', + '{"match":{"query":"paimon lake"}}', 10 ) ORDER BY __paimon_search_score DESC; @@ -431,7 +431,7 @@ relevance score is required. `top_k` must be between 1 and 10,000. CALL sys.full_text_search( `table` => 'default.items', `column` => 'content', - query => '{"match":{"column":"content","terms":"paimon lake"}}', + query => '{"match":{"query":"paimon lake"}}', top_k => 10, projection => 'id,content,__paimon_search_score' ); @@ -480,7 +480,7 @@ FROM hybrid_search( 'options', map())), array(named_struct( 'column', 'content', - 'query', '{"match":{"column":"content","terms":"paimon lake"}}', + 'query', '{"match":{"query":"paimon lake"}}', 'limit', 20, 'weight', 1.0f, 'options', map())), diff --git a/paimon-full-text/README.md b/paimon-full-text/README.md index 2d17cccfb95d..914aa03c8567 100644 --- a/paimon-full-text/README.md +++ b/paimon-full-text/README.md @@ -129,7 +129,7 @@ scores through its configured `rrf`, `weighted_score`, or `mrr` ranker. CALL sys.full_text_search( `table` => 'default.articles', `column` => 'content', - query => '{"match":{"column":"content","terms":"paimon lake"}}', + query => '{"match":{"query":"paimon lake"}}', top_k => 10, projection => 'id,content,__paimon_search_score' ); @@ -178,16 +178,18 @@ Available tokenizer options: | Option | Default | Description | |--------|---------|-------------| | `full-text.tokenizer` | `default` | Tokenizer used by the full-text index. Supported values: `default`, `simple`, `whitespace`, `raw`, `ngram`, `jieba`. | -| `full-text.ngram.min-gram` | `2` | Minimum gram length for the `ngram` tokenizer. | -| `full-text.ngram.max-gram` | `2` | Maximum gram length for the `ngram` tokenizer. | +| `full-text.ngram.min-gram` | `3` | Minimum gram length for the `ngram` tokenizer. | +| `full-text.ngram.max-gram` | `3` | Maximum gram length for the `ngram` tokenizer. | | `full-text.ngram.prefix-only` | `false` | Whether the `ngram` tokenizer only emits prefix ngrams. | +| `full-text.jieba.search-mode` | `true` | Whether the `jieba` tokenizer uses search mode. | +| `full-text.jieba.ordinal-position` | `true` | Whether the `jieba` tokenizer uses ordinal positions. | | `full-text.lower-case` | `true` | Whether configurable tokenizers lowercase emitted tokens. | | `full-text.max-token-length` | `40` | Maximum token length kept by configurable tokenizers. | -| `full-text.ascii-folding` | `false` | Whether to normalize non-ASCII Latin characters to ASCII. | -| `full-text.stem` | `false` | Whether to apply stemming to emitted tokens. | +| `full-text.ascii-folding` | `true` | Whether to normalize non-ASCII Latin characters to ASCII. | +| `full-text.stem` | `true` | Whether to apply stemming to emitted tokens. | | `full-text.language` | `english` | Language used by stemming and built-in stop word filters. | -| `full-text.remove-stop-words` | `false` | Whether to remove built-in stop words for the configured language. | -| `full-text.stop-words` | ` ` | Semicolon-separated custom stop words to remove. | +| `full-text.remove-stop-words` | `true` | Whether to remove built-in stop words for the configured language. | +| `full-text.stop-words` | empty | Semicolon-separated custom stop words to remove. Requires `full-text.remove-stop-words=true`. | | `full-text.with-position` | `true` | Whether to store term positions for phrase queries. | Tokenizer settings are persisted in each global index file's metadata. Readers use that metadata