ES已存在的索引下添加映射
解释如下:给ticketing_order_info的索引,增加映射字段verificationCodeState,字段类型为integer
实现:
PUT /ticketing_order_info/_mapping/
{
"properties": {
"verificationCodeState": {
"type": "integer"
}
}
}
PUT /ticketing_order_info/_mapping/
{
"properties": {
"isTouristGroupName": {
"type": "keyword",
"ignore_above": 256
}
}
}
解释如下:给ticketing_order_info的索引,增加映射字段payTypeName,字段类型为String,并设置为关键字
PUT /ticketing_order_info/_mapping/
{
"properties": {
"payTypeName": {
"type": "keyword",
"ignore_above": 256
}
}
}
PUT /ticketing_order_details/_mapping/
{
"properties": {
"delFlag": {
"type": "integer"
}
}
}
解释如下:给ticketing_order_details的索引,增加映射字段touristGroupId,字段类型为long
PUT /ticketing_order_details/_mapping/
{
"properties": {
"touristGroupId": {
"type": "long"
}
}
}
PUT /ticketing_order_details/_mapping/
{
"properties": {
"seatNumber": {
"type": "keyword",
"ignore_above": 256
}
}
}
PUT /ticketing_order_details/_mapping/
{
"properties": {
"createBy": {
"type": "keyword",
"ignore_above": 256
}
}
}
PUT /ticketing_order_details/_mapping/
{
"properties": {
"updateBy": {
"type": "keyword",
"ignore_above": 256
}
}
}
PUT /ticketing_order_details/_mapping/
{
"properties": {
"remarks": {
"type": "keyword",
"ignore_above": 256
}
}
}
解释如下:给ticketing_order_details的索引,增加映射字段showTime,字段类型为date,并设置自定义时间格式
PUT /ticketing_order_details/_mapping/
{
"properties": {
"showTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss || yyyy-MM-dd'T'HH:mm:ss'+08:00' || strict_date_optional_time || epoch_millis"
}
}
}
PUT /ticketing_order_details/_mapping/
{
"properties": {
"createTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss || yyyy-MM-dd'T'HH:mm:ss'+08:00' || strict_date_optional_time || epoch_millis"
}
}
}
PUT /ticketing_order_details/_mapping/
{
"properties": {
"updateTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss || yyyy-MM-dd'T'HH:mm:ss'+08:00' || strict_date_optional_time || epoch_millis"
}
}
}
PUT /ticketing_order_details/_mapping/
{
"properties": {
"businessCode": {
"type": "integer"
}
}
}文章来源:https://www.toymoban.com/news/detail-599133.html
PUT /ticketing_order_details/_mapping/
{
"properties": {
"businessKindId": {
"type": "long"
}
}
}文章来源地址https://www.toymoban.com/news/detail-599133.html
到了这里,关于ES映射操作 已创建的ES索引 增加映射字段(类似DB库增加给表增加字段)一样的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!