大佬教程收集整理的这篇文章主要介绍了[data] 的映射定义具有不受支持的参数,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用此命令来启动映射。对我来说似乎很好。
curl -X PUT "localhost:9200/data?pretty" -H 'Content-Type: application/Json' -d
'{
"setTings":{
"number_of_shards":"1","number_of_replicas":"1"
},"mapPings":{
"propertIEs":{
"data":{
"type":"nested","propertIEs":{
"title":{
"type":"text"
},"sources":{
"type":"keyword"
},"flags":{
"type":"keyword","null_value":"NulL"
}
},"steps":{
"type":"nested","propertIEs":{
"time": {
"type": "keyword"
},"products":{
"type":"nested","propertIEs":{
"name":{
"type":"text"
},"link":{
"type":"keyword","null_value":"NulL"
},"type":{
"type":"keyword","ingredIEnts":{
"type":"keyword","flags":{
"type":"keyword","null_value":"NulL"
}
}
}
}
}
}
}
}
}'
但是,它抛出了这个错误:
"type" : "mapper_parsing_exception","reason" : "MapPing deFinition for [routInes] has unsupported parameters: [steps : {type=nested,propertIEs={time=keyword,products={type=nested,propertIEs={name={type=text},link={null_value=NulL,type=keyworD},flags={null_value=NulL,ingredIEnts={null_value=NulL,type={null_value=NulL,type=keyworD}}}}}]"
你能告诉我这个映射有什么问题吗? Steps 包含对象数组,所以我相信它应该是 type:nested
。另外,我检查了Json解析,很好。
这看起来不对:
"steps":{
"type":"nested","properties":{
"time":"keyword",<---- here
更新这是您正在寻找的正确映射:
{
"setTings": {
"number_of_shards": "1","number_of_replicas": "1"
},"mappings": {
"properties": {
"data": {
"type": "nested","properties": {
"title": {
"type": "text"
},"sources": {
"type": "keyword"
},"flags": {
"type": "keyword","null_value": "NULL"
}
}
},"steps": {
"type": "nested","properties": {
"time": {
"type": "keyword"
},"products": {
"type": "nested","properties": {
"name": {
"type": "text"
},"link": {
"type": "keyword","null_value": "NULL"
},"type": {
"type": "keyword","ingredients": {
"type": "keyword","flags": {
"type": "keyword","null_value": "NULL"
}
}
}
}
}
}
}
}
以上是大佬教程为你收集整理的[data] 的映射定义具有不受支持的参数全部内容,希望文章能够帮你解决[data] 的映射定义具有不受支持的参数所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。