0
我的索引中有许多字段名称以_count结尾的字段(例如page_count
,order_count
等),我总是希望它们是long
。我试图创建了我认为是默认映射如下:根据通配符设置默认字段类型
{
"mappings": {
"_default_": {
"_all": {
"enabled": false,
"norms": {
"enabled": false
}
},
"properties": {
"*_count": {
"type": "long"
}
}
}
},
"settings": {
"index.query.default_field": "message",
"number_of_replicas": 2,
"number_of_shards": 3
},
"template": "core-app-*"
}
然而,这似乎并没有工作,我现在有字符串字段在我最近的指数:
"page_count":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
是这是基于通配符创建映射的正确方法?我假设不是因为它似乎没有工作... :)