我通过以下语句创建一个索引:
date字段类型竟然是text,我期望是date类型:
POST /oplog_v2/goods/
{
"title": "My second blog entry",
"text": "Still trying this out...",
"date": "2014-01-01 09:01:10"
}
date字段类型竟然是text,我期望是date类型:
{
"oplog_v2": {
"mappings": {
"goods": {
"properties": {
"date": {
"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
}
}
}
}
}
}
}
}
5 个回复
kennywu76 - Wood
赞同来自: laoyang360
Cheetah
赞同来自:
zhangyufu - 学习使我快乐
赞同来自:
gh
赞同来自:
wanyanglan - 90后
赞同来自:
想给时间字段添加不被分词效果怎么去修改mapping