PUT test_index/_mapping/test_type
{
"properties": {
"poolId": {
"type": "long"
},
"productId": {
"type": "long"
}
}
}
PUT test_index/_mapping/test_type
索引名称 索引中某一个类型
"properties": { 字段的集合
"poolId": { 被添加的字段名称
"type": "long" type表字段类型, long表示字段对应的数据类型
},
"productId": {
"type": "long"
}
} }
ES-DDL添加字段
最新推荐文章于 2024-11-05 16:35:12 发布
本文介绍了如何在 Elasticsearch 中为索引 `test_index` 的 `test_type` 类型定义 `poolId` 和 `productId` 字段,这两个字段都被定义为 `long` 类型,用于存储长整型数值数据。
303

被折叠的 条评论
为什么被折叠?



