数据迁移:复制新索引
POST _reindex
{
"source": {
"index": "old_index"
},
"dest": {
"index": "new_index"
}
}
创建索引 Mapping
PUT /new_index
{
"mappings": {
"properties": {
"account_number": {
"type": "long"
},
"address": {
"type": "text"
},
"age": {
"type": "integer"
},
"balance": {
"type": "long"
},
"city": {
"type": "keyword"
},
"email": {
"type": "keyword"
},
"employer": {
"type": "keyword"
},
"firstname": {
"type": "text"
},
"gender": {
"type": "keyword"
},
"lastname": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"state": {
"type": "keyword"
}
}
}
}
查询数据
GET /new_index/_search
查询Mapping
GET /index_name/_mapping
报错:Limit of total fields [1000] in index [xxx] has been exceeded
1.查询settings设置(未设置的情况下,默认结果里边应该没有limit选项)
GET xxxx/_settings
2.设置下字段上限
PUT xxxxx/_settings {
"index.mapping.total_fields.limit": 2000
}
网友评论