Elasticsearch-映射
文章目录
核心简单域类型
Elasticsearch 支持 如下简单域类型:
- 字符串: string
- 整数 : byte, short, integer, long
- 浮点数: float, double
- 布尔型: boolean
- 日期: date
查看映射
GET /website/_mapping/blog
GET /website/_mapping
{
"website": {
"mappings": {
"blog": {
"properties": {
"date": {
"type": "date",
"format": "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis"
},
"tags": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"text": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"title": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"views": {
"type": "long"
}
}
}
}
}
}
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论