[英]How to access Object inside a record while using script with ScriptedMetricAggregationBuilder elasticsearch?
"recordOne": {
"properties": {
"id": {
"type": "integer"
},
"recordtwo": {
"properties": {
"propertyone": {
"type": "integer"
},
"propertytwo":{
"type":"date"
}
}
}
},
"_parent": {
"type": "parentrecord"
}
}
Here i am trying to access recordtwo properties like "doc.recordtwo.propertyone"
在这里,我尝试访问recordtwo属性,例如"doc.recordtwo.propertyone"
i am getting this exception : 我收到此异常:
'Elasticsearch exception [type=illegal_argument_exception, reason=No field found for [recordtwo] in mapping with types [recordOne]]' “ Elasticsearch异常[type = illegal_argument_exception,原因=在映射类型为[recordOne]的映射中找不到[recordtwo]的字段”
Though i am able to access id. 虽然我能够访问ID。 ie 即
"doc.id"
我在下面尝试过,并且有效。
"doc['recordtwo.propertyone']"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.