This is an automated email from the ASF dual-hosted git repository.
eldenmoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new b8dfb0265f8 [doc](inverted-index) Clarify norms metadata precedence
(#4736)
b8dfb0265f8 is described below
commit b8dfb0265f81cd34cdb73bccf22c11ea4ba2360b
Author: lihangyu <[email protected]>
AuthorDate: Wed Dec 2 11:02:33 2026 +0800
[doc](inverted-index) Clarify norms metadata precedence (#4736)
---
docs/admin-manual/config/be-config.md | 2 +-
.../basic-element/sql-data-types/semi-structured/VARIANT.md | 2 +-
docs/table-design/index/inverted-index/scoring.md | 6 ++++--
.../current/admin-manual/config/be-config.md | 2 +-
.../basic-element/sql-data-types/semi-structured/VARIANT.md | 2 +-
.../current/table-design/index/inverted-index/scoring.md | 6 ++++--
.../version-4.x/admin-manual/config/be-config.md | 2 +-
.../basic-element/sql-data-types/semi-structured/VARIANT.md | 2 +-
.../version-4.x/table-design/index/inverted-index/scoring.md | 4 ++--
versioned_docs/version-4.x/admin-manual/config/be-config.md | 2 +-
.../basic-element/sql-data-types/semi-structured/VARIANT.md | 2 +-
.../version-4.x/table-design/index/inverted-index/scoring.md | 4 ++--
12 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/docs/admin-manual/config/be-config.md
b/docs/admin-manual/config/be-config.md
index d3477db03f5..ad7eeb1c89d 100644
--- a/docs/admin-manual/config/be-config.md
+++ b/docs/admin-manual/config/be-config.md
@@ -1056,7 +1056,7 @@ This is the source-code default; the effective value
depends on the deployment c
#### `inverted_index_skip_norms_for_variant`
* Type: bool
-* Description: Supported since version 4.1.5. Supports dynamic configuration.
When `true`, inverted indexes on VARIANT subpaths omit Norms regardless of the
index's `norms` property. This reduces index storage for multiple subpaths, but
those indexes can no longer support BM25 `score()` calculations that require
Norms. Norms are retained by default. See [Relevance
Scoring](../../table-design/index/inverted-index/scoring.md).
+* Description: Supported since version 4.1.5. Supports dynamic configuration.
This setting supplies the default only for VARIANT subpath indexes without an
explicit `norms` property: `true` omits Norms and `false` writes them. Explicit
`"norms" = "true"` retains Norms even when this setting is `true`; explicit
`"norms" = "false"` omits them. Omitting Norms saves space but prevents BM25
`score()` calculations that require them. Ordinary column indexes are
unaffected. See [Relevance Scorin [...]
* Default value: false
#### `default_num_rows_per_column_file_block`
diff --git
a/docs/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/docs/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index c8bffe3688d..f32183a59d9 100644
--- a/docs/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++ b/docs/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -693,7 +693,7 @@ CREATE TABLE IF NOT EXISTS tbl (
);
```
-Disabling norms does not affect `MATCH` filtering, but `score()` returns an
error when it reads a segment without norms. The BE config
`inverted_index_skip_norms_for_variant` disables norms for all VARIANT paths.
See [Record Length and the norms
Property](../../../../table-design/index/inverted-index/scoring.md#record-length-and-the-norms-property)
for details.
+Disabling norms does not affect `MATCH` filtering, but `score()` returns an
error when it reads a segment without norms. The BE config
`inverted_index_skip_norms_for_variant` supplies the default only when the
index has no explicit `norms` property; explicit `"norms" = "true"` or `"norms"
= "false"` takes precedence. See [Record Length and the norms
Property](../../../../table-design/index/inverted-index/scoring.md#record-length-and-the-norms-property)
for details.
### When indexes don’t work
diff --git a/docs/table-design/index/inverted-index/scoring.md
b/docs/table-design/index/inverted-index/scoring.md
index a4178c12f03..b40a49d0416 100644
--- a/docs/table-design/index/inverted-index/scoring.md
+++ b/docs/table-design/index/inverted-index/scoring.md
@@ -195,9 +195,11 @@ The `norms` index property and the
`inverted_index_skip_norms_for_variant` BE co
INDEX idx_content(content) USING INVERTED PROPERTIES("parser" = "english",
"norms" = "false")
```
-VARIANT subpaths inherit the index's `norms` property, costing `rows × paths`
bytes. Setting the BE config `inverted_index_skip_norms_for_variant` (default
`false`, changeable at runtime) to `true` disables norms for all VARIANT path
indexes, overriding the index property.
+VARIANT subpaths inherit the index's `norms` property, costing `rows × paths`
bytes. An explicit `norms` value takes precedence: `"norms" = "true"` keeps
norms and `"norms" = "false"` omits them, regardless of the BE config. If
`norms` is not specified, `inverted_index_skip_norms_for_variant` (default
`false`, changeable at runtime) controls the default for VARIANT path indexes:
`true` omits norms and `false` writes them. Ordinary column indexes are
unaffected.
-Disabling norms does not affect `MATCH_*` filtering, but `score()` returns an
error if it reads any segment without norms. These settings affect newly
written segments; existing segments remain unchanged until compaction rewrites
them. Upgrade all BEs to a version supporting these settings before changing
them.
+On versions without [the precedence
change](https://github.com/apache/doris/pull/71163), setting the BE config to
`true` overrides even an explicit `"norms" = "true"`. In versions containing
that change, explicit index properties take precedence and the BE config
applies only when `norms` is absent. Do not assume that an older 4.x release
includes this change.
+
+Disabling norms does not affect `MATCH_*` filtering, but `score()` returns an
error if it reads any segment without norms. These settings affect newly
written segments. Changing the configuration or index metadata does not restore
missing norms in existing segments; rebuild or rewrite the affected indexes
before scoring the whole collection. Upgrade all BEs to a version supporting
the desired precedence before changing these settings.
## Interpreting the Results
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/config/be-config.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/config/be-config.md
index c99d1f1ee85..b1e22e1af64 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/config/be-config.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/config/be-config.md
@@ -1046,7 +1046,7 @@ BaseCompaction:546859:
#### `inverted_index_skip_norms_for_variant`
* 类型:bool
-* 描述:自 4.1.5 版本起支持,支持动态修改。设为 `true` 时,为 VARIANT 子路径生成的倒排索引统一省略 Norms,无论索引的
`norms` 属性为何值。这可以减少多子路径索引的空间开销,但这些索引不再支持依赖 Norms 的 BM25 `score()` 评分。默认保留
Norms。详见 [相关性评分](../../table-design/index/inverted-index/scoring.md)。
+* 描述:自 4.1.5 版本起支持,支持动态修改。此配置仅决定未显式指定 `norms` 的 VARIANT 子路径索引的默认行为:`true` 省略
Norms,`false` 写入 Norms。显式 `"norms" = "true"` 在此配置为 `true` 时仍保留 Norms;显式
`"norms" = "false"` 始终省略 Norms。省略 Norms 可以节省空间,但无法执行依赖它的 BM25 `score()`
评分。普通列索引不受影响。详见 [相关性评分](../../table-design/index/inverted-index/scoring.md)。
* 默认值:false
#### `default_num_rows_per_column_file_block`
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index d201e82e195..2e1ef9c8c19 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -693,7 +693,7 @@ CREATE TABLE IF NOT EXISTS tbl (
);
```
-关闭 norms 不影响 `MATCH` 过滤,但 `score()` 读到缺少 norms 的段时会报错。BE 配置项
`inverted_index_skip_norms_for_variant` 可统一关闭 VARIANT 路径的 norms,详见[记录长度与 norms
属性](../../../../table-design/index/inverted-index/scoring.md#记录长度与-norms-属性)。
+关闭 norms 不影响 `MATCH` 过滤,但 `score()` 读到缺少 norms 的段时会报错。BE 配置项
`inverted_index_skip_norms_for_variant` 仅在索引未显式指定 `norms` 时提供默认值;显式 `"norms" =
"true"` 或 `"norms" = "false"` 优先。详见[记录长度与 norms
属性](../../../../table-design/index/inverted-index/scoring.md#记录长度与-norms-属性)。
### 索引失效问题 {#when-indexes-dont-work}
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/index/inverted-index/scoring.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/index/inverted-index/scoring.md
index 5b5a4ff512e..7917b758717 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/index/inverted-index/scoring.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/index/inverted-index/scoring.md
@@ -195,9 +195,11 @@ avgdl = total_terms / total_rows
INDEX idx_content(content) USING INVERTED PROPERTIES("parser" = "english",
"norms" = "false")
```
-VARIANT 子路径继承索引的 `norms` 属性,空间开销为 `行数 × 路径数` 字节。BE 配置项
`inverted_index_skip_norms_for_variant`(默认 `false`,可动态修改)设为 `true` 时,所有 VARIANT
路径索引都不写 norms,优先于索引属性。
+VARIANT 子路径继承索引的 `norms` 属性,空间开销为 `行数 × 路径数` 字节。显式 `norms` 属性优先:`"norms" =
"true"` 保留 norms,`"norms" = "false"` 省略 norms,不受 BE 配置影响。仅当未指定 `norms`
时,`inverted_index_skip_norms_for_variant`(默认 `false`,可动态修改)才决定 VARIANT
路径索引的默认行为:`true` 省略 norms,`false` 写入 norms。普通列索引不受此配置影响。
-关闭 norms 不影响 `MATCH_*` 过滤,但 `score()` 读到任一缺少 norms 的段时会报错。该属性和配置项只影响新写入的段;已有段在
compaction 重写前保持不变。修改前须将所有 BE 升级到支持它们的版本。
+在不包含[优先级调整](https://github.com/apache/doris/pull/71163)的版本中,BE 配置设为 `true`
会覆盖显式 `"norms" = "true"`。包含该调整的版本优先采用显式索引属性,仅在未指定 `norms` 时使用 BE 配置。不能据此认为旧版
4.x 已包含该调整。
+
+关闭 norms 不影响 `MATCH_*` 过滤,但 `score()` 读到任一缺少 norms
的段时会报错。这些设置影响新写入的段。修改配置或索引元数据不会补齐已有段缺失的 norms;对整个集合评分前,需要重建或重写受影响的索引。修改设置前,应将所有
BE 升级到支持目标优先级的版本。
## 结果解读
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/admin-manual/config/be-config.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/admin-manual/config/be-config.md
index 703f4b8489e..e2f48df6eb6 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/admin-manual/config/be-config.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/admin-manual/config/be-config.md
@@ -1040,7 +1040,7 @@ BaseCompaction:546859:
#### `inverted_index_skip_norms_for_variant`
* 类型:bool
-* 描述:自 4.1.5 版本起支持,支持动态修改。设为 `true` 时,为 VARIANT 子路径生成的倒排索引统一省略 Norms,无论索引的
`norms` 属性为何值。这可以减少多子路径索引的空间开销,但这些索引不再支持依赖 Norms 的 BM25 `score()` 评分。默认保留
Norms。详见 [相关性评分](../../table-design/index/inverted-index/scoring.md)。
+* 描述:自 4.1.5
版本起支持,支持动态修改。在不包含[优先级调整](https://github.com/apache/doris/pull/71163)的版本中,BE
配置设为 `true` 会覆盖显式 `"norms" = "true"`。包含该调整的版本优先采用显式索引属性,仅在未指定 `norms` 时使用 BE
配置。不能据此认为旧版 4.x 已包含该调整。省略 Norms 可以节省空间,但无法执行依赖它的 BM25 `score()` 评分。详见
[相关性评分](../../table-design/index/inverted-index/scoring.md)。
* 默认值:false
#### `default_num_rows_per_column_file_block`
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index 51d507737ed..7a748c4f267 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -318,7 +318,7 @@ CREATE TABLE IF NOT EXISTS tbl (
);
```
-关闭 norms 不影响 `MATCH` 过滤,但 `score()` 读到缺少 norms 的段时会报错。BE 配置项
`inverted_index_skip_norms_for_variant` 可统一关闭 VARIANT 路径的 norms,详见[记录长度与 norms
属性](../../../../table-design/index/inverted-index/scoring.md#记录长度与-norms-属性)。
+关闭 norms 不影响 `MATCH` 过滤,但 `score()` 读到缺少 norms 的段时会报错。BE 配置项
`inverted_index_skip_norms_for_variant`(默认
`false`,可动态修改)的优先级随版本不同:在不包含[优先级调整](https://github.com/apache/doris/pull/71163)的版本中,BE
配置设为 `true` 会覆盖显式 `"norms" = "true"`。包含该调整的版本优先采用显式索引属性,仅在未指定 `norms` 时使用 BE
配置。不能据此认为旧版 4.x 已包含该调整。详见[记录长度与 norms
属性](../../../../table-design/index/inverted-index/scoring.md#记录长度与-norms-属性)。
### 索引失效问题
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/table-design/index/inverted-index/scoring.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/table-design/index/inverted-index/scoring.md
index 0fa8536c9e4..06b601557e1 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/table-design/index/inverted-index/scoring.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/table-design/index/inverted-index/scoring.md
@@ -184,9 +184,9 @@ avgdl = total_terms / total_rows
INDEX idx_content(content) USING INVERTED PROPERTIES("parser" = "english",
"norms" = "false")
```
-VARIANT 子路径继承索引的 `norms` 属性,空间开销为 `行数 × 路径数` 字节。BE 配置项
`inverted_index_skip_norms_for_variant`(默认 `false`,可动态修改)设为 `true` 时,所有 VARIANT
路径索引都不写 norms,优先于索引属性。
+VARIANT 子路径继承索引的 `norms` 属性,空间开销为 `行数 × 路径数` 字节。BE 配置项
`inverted_index_skip_norms_for_variant`(默认
`false`,可动态修改)的优先级随版本不同:在不包含[优先级调整](https://github.com/apache/doris/pull/71163)的版本中,BE
配置设为 `true` 会覆盖显式 `"norms" = "true"`。包含该调整的版本优先采用显式索引属性,仅在未指定 `norms` 时使用 BE
配置。不能据此认为旧版 4.x 已包含该调整。
-关闭 norms 不影响 `MATCH_*` 过滤,但 `score()` 读到任一缺少 norms 的段时会报错。该属性和配置项只影响新写入的段;已有段在
compaction 重写前保持不变。修改前须将所有 BE 升级到支持它们的版本。
+关闭 norms 不影响 `MATCH_*` 过滤,但 `score()` 读到任一缺少 norms
的段时会报错。这些设置影响新写入的段。修改配置或索引元数据不会补齐已有段缺失的 norms;对整个集合评分前,需要重建或重写受影响的索引。修改设置前,应将所有
BE 升级到支持目标优先级的版本。
## 结果解读
diff --git a/versioned_docs/version-4.x/admin-manual/config/be-config.md
b/versioned_docs/version-4.x/admin-manual/config/be-config.md
index 881cadb6b80..c242feda414 100644
--- a/versioned_docs/version-4.x/admin-manual/config/be-config.md
+++ b/versioned_docs/version-4.x/admin-manual/config/be-config.md
@@ -1050,7 +1050,7 @@ This is the source-code default; the effective value
depends on the deployment c
#### `inverted_index_skip_norms_for_variant`
* Type: bool
-* Description: Supported since version 4.1.5. Supports dynamic configuration.
When `true`, inverted indexes on VARIANT subpaths omit Norms regardless of the
index's `norms` property. This reduces index storage for multiple subpaths, but
those indexes can no longer support BM25 `score()` calculations that require
Norms. Norms are retained by default. See [Relevance
Scoring](../../table-design/index/inverted-index/scoring.md).
+* Description: Supported since version 4.1.5. Supports dynamic configuration.
On versions without [the precedence
change](https://github.com/apache/doris/pull/71163), setting the BE config to
`true` overrides even an explicit `"norms" = "true"`. In versions containing
that change, explicit index properties take precedence and the BE config
applies only when `norms` is absent. Do not assume that an older 4.x release
includes this change. Omitting Norms saves space but prevents BM25 `score [...]
* Default value: false
#### `default_num_rows_per_column_file_block`
diff --git
a/versioned_docs/version-4.x/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
b/versioned_docs/version-4.x/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
index 23adda7aeda..775474251a4 100644
---
a/versioned_docs/version-4.x/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
+++
b/versioned_docs/version-4.x/sql-manual/basic-element/sql-data-types/semi-structured/VARIANT.md
@@ -318,7 +318,7 @@ CREATE TABLE IF NOT EXISTS tbl (
);
```
-Disabling norms does not affect `MATCH` filtering, but `score()` returns an
error when it reads a segment without norms. The BE config
`inverted_index_skip_norms_for_variant` disables norms for all VARIANT paths.
See [Record Length and the norms
Property](../../../../table-design/index/inverted-index/scoring.md#record-length-and-the-norms-property)
for details.
+Disabling norms does not affect `MATCH` filtering, but `score()` returns an
error when it reads a segment without norms. For the BE config
`inverted_index_skip_norms_for_variant` (default `false`, changeable at
runtime): On versions without [the precedence
change](https://github.com/apache/doris/pull/71163), setting the BE config to
`true` overrides even an explicit `"norms" = "true"`. In versions containing
that change, explicit index properties take precedence and the BE config
applies [...]
### When indexes don’t work
diff --git
a/versioned_docs/version-4.x/table-design/index/inverted-index/scoring.md
b/versioned_docs/version-4.x/table-design/index/inverted-index/scoring.md
index 83f7802864c..c208be1648c 100644
--- a/versioned_docs/version-4.x/table-design/index/inverted-index/scoring.md
+++ b/versioned_docs/version-4.x/table-design/index/inverted-index/scoring.md
@@ -184,9 +184,9 @@ The `norms` index property and the
`inverted_index_skip_norms_for_variant` BE co
INDEX idx_content(content) USING INVERTED PROPERTIES("parser" = "english",
"norms" = "false")
```
-VARIANT subpaths inherit the index's `norms` property, costing `rows × paths`
bytes. Setting the BE config `inverted_index_skip_norms_for_variant` (default
`false`, changeable at runtime) to `true` disables norms for all VARIANT path
indexes, overriding the index property.
+VARIANT subpaths inherit the index's `norms` property, costing `rows × paths`
bytes. For the BE config `inverted_index_skip_norms_for_variant` (default
`false`, changeable at runtime): On versions without [the precedence
change](https://github.com/apache/doris/pull/71163), setting the BE config to
`true` overrides even an explicit `"norms" = "true"`. In versions containing
that change, explicit index properties take precedence and the BE config
applies only when `norms` is absent. Do not [...]
-Disabling norms does not affect `MATCH_*` filtering, but `score()` returns an
error if it reads any segment without norms. These settings affect newly
written segments; existing segments remain unchanged until compaction rewrites
them. Upgrade all BEs to a version supporting these settings before changing
them.
+Disabling norms does not affect `MATCH_*` filtering, but `score()` returns an
error if it reads any segment without norms. These settings affect newly
written segments. Changing the configuration or index metadata does not restore
missing norms in existing segments; rebuild or rewrite the affected indexes
before scoring the whole collection. Upgrade all BEs to a version supporting
the desired precedence before changing these settings.
## Interpreting the Results
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]