[英]Using the pipeline ingest in elasticsearch to rename an element
我试图重命名Elasticsearch中的元素,但遇到了问题。
我试图将这个元素重命名为“列表到列表”,所以我尝试了_source.list并成功了。
好的,在那之后,我尝试将_source.list.metaData重命名为metaDatas,并且似乎遇到了问题。 这是我正在使用的代码,这也是映射。
PUT _ingest/pipeline/pipeline_rename_xxx
{
"description" : "rename xxx",
"processors" : [
{
"rename": {
"field": "_source.list.metaDatas",
"target_field": "metaDatas"
}
}
]
}
{
"tweet": {
"mappings": {
"document": {
"properties": {
"list": {
"properties": {
"metaData": {
"reason": "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [_source.list.metaData] doesn't exist"
This is what i am expecting
{
"tweet": {
"mappings": {
"document": {
"properties": {
"list": {
"properties": {
"metaDatas": {
I will appreciate any help. Thanks
POST _reindex
{
"source": {
"index": "promoted"
},
"dest": {
"index": "new_promoted"
}
}
PUT _ingest/pipeline/pipeline_rename_xxx
{
"description": "rename xxx",
"processors": [
{
"foreach": {
"field": "list",
"processor": {
"foreach": {
"field": "_ingest._value.promoted.league",
"processor": {
"foreach": {
"field": "_ingest._value.league",
"processor": {
"rename": {
"field": "_ingest._value.division.position",
"target_field": "_ingest._value.division.positions"
}
}
}
}
}
}
}
}
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.