kayx23 commented on code in PR #13270: URL: https://github.com/apache/apisix/pull/13270#discussion_r3143789099
########## docs/en/latest/plugins/elasticsearch-logger.md: ########## @@ -125,7 +125,8 @@ curl "http://127.0.0.1:9180/apisix/admin/routes" -X PUT \ "elasticsearch-logger": { "endpoint_addrs": ["http://elasticsearch:9200"], "field": { - "index": "gateway" + "index": "gateway", + "type": "logs" Review Comment: `field.type` is not a valid attribute in the `elasticsearch-logger` schema — the schema only defines `field.index` (see `apisix/plugins/elasticsearch-logger.lua` lines 46–52). The plugin sets `_type` internally for ES 5/6 compatibility, but it is not user-configurable. Please remove `"type": "logs"` from all plugin config examples in this PR (it appears multiple times in both EN and ZH files). ########## docs/zh/latest/plugins/elasticsearch-logger.md: ########## @@ -124,7 +126,8 @@ curl "http://127.0.0.1:9180/apisix/admin/routes" -X PUT \ "elasticsearch-logger": { "endpoint_addrs": ["http://elasticsearch:9200"], "field": { - "index": "gateway" + "index": "gateway", + "type": "logs" Review Comment: `field.type` 不是 `elasticsearch-logger` schema 中的有效属性——schema 只定义了 `field.index`(见 `apisix/plugins/elasticsearch-logger.lua` 第 46–52 行)。插件内部会为 ES 5/6 兼容性设置 `_type`,但该字段不对用户开放。请从本 PR 所有插件配置示例中删除 `"type": "logs"`(EN 和 ZH 文件中均多次出现)。 -- 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]
