# Issus about elasticsearch nested pipeline

**URL:** <https://forum.opensearch.org/t/issus-about-elasticsearch-nested-pipeline/7569>\
**Category:** Open Source Elasticsearch and Kibana\
**Created:** [November 11, 2021, 3:30am UTC](https://forum.opensearch.org/t/issus-about-elasticsearch-nested-pipeline/7569 "2021-11-11T03:30:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![feng](https://avatars.discourse-cdn.com/v4/letter/f/82dd89/32.png) [@feng](https://forum.opensearch.org/u/feng)\
**Post date:** [November 11, 2021, 3:30am UTC](https://forum.opensearch.org/t/issus-about-elasticsearch-nested-pipeline/7569/1 "2021-11-11T03:30:44Z")

</div>

–pipeline\_for\_distribution  
PUT \_ingest/pipeline/pipeline\_for\_distribution  
{  
“description”: “a pipeline for distribution”,  
“processors”: [  
{  
“pipeline”:{  
“name”: “pipeline\_for\_set”,  
“if”: “”"  
String tagss = ctx[‘tags’];  
if (tagss.toLowerCase().contains(‘openstack’)) {  
return true;  
}  
return false;  
“”"  
}  
},  
{  
“pipeline”: {  
“name”: “pipeline\_for\_split”,  
“if”: “”"  
String tagsx = ctx[‘tags’];  
if (tagsx.toLowerCase().contains(‘hadoop’)) {  
return true;  
}  
return false;  
“”"  
}  
}  
]  
}  
–pipeline\_for\_split  
PUT \_ingest/pipeline/pipeline\_for\_split  
{  
“description”: “a pipeline for split”,  
“processors”: [  
{  
“split”: {  
“field”: “tags”,  
“separator”: “,”  
}  
}  
]  
}  
–pipeline\_for\_set or son pipeline  
PUT \_ingest/pipeline/pipeline\_for\_set  
{  
“description”: “a pipeline for set”,  
“processors”: [  
//not ok  
{  
“pipeline”: {  
“name”: “pipeline\_for\_split”  
}  
},  
//ok  
{  
“set”:{  
“field”: “views”,  
“value”: 0  
}  
}  
]  
}  
–test pipeline  
POST \_ingest/pipeline/\_simulate  
{  
“pipeline”: {  
“description”: “to split blog tags”,  
“processors”: [  
{  
“pipeline”: {  
“name”: “pipeline\_for\_distribution”  
}  
}  
]  
},

“docs”: [  
{  
“\_index”:“index”,  
“\_id”:“id”,  
“\_source”:{  
“title”:“Introducing big data…”,  
“tags”:“hadoop,elasticsearch,spark”,  
“content”:“You konw, for big data”  
}  
},  
{  
“\_index”:“index”,  
“\_id”:“idxx”,  
“\_source”:{  
“title”:“Introducing cloud computering”,  
“tags”:“openstack,k8s”,  
“content”:“You konw, for cloud”  
}  
}  
]  
}  
– success result  
{  
“docs” : [  
{  
“doc” : {  
“\_index” : “index”,  
“\_type” : “\_doc”,  
“\_id” : “id”,  
“\_source” : {  
“title” : “Introducing big data…”,  
“content” : “You konw, for big data”,  
“tags” : [  
“hadoop”,  
“elasticsearch”,  
“spark”  
]  
},  
“\_ingest” : {  
“timestamp” : “2021-11-11T02:50:35.625742716Z”  
}  
}  
},  
{  
“doc” : {  
“\_index” : “index”,  
“\_type” : “\_doc”,  
“\_id” : “idxx”,  
“\_source” : {  
“title” : “Introducing cloud computering”,  
“content” : “You konw, for cloud”,  
“views” : 0,  
“tags” : “openstack,k8s”  
},  
“\_ingest” : {  
“timestamp” : “2021-11-11T02:50:35.625751505Z”  
}  
}  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![feng](https://avatars.discourse-cdn.com/v4/letter/f/82dd89/32.png) [@feng](https://forum.opensearch.org/u/feng)\
**Post date:** [November 11, 2021, 3:32am UTC](https://forum.opensearch.org/t/issus-about-elasticsearch-nested-pipeline/7569/2 "2021-11-11T03:32:09Z")

</div>

if set son pipeline\_for\_split to pipeline\_for\_set, error occure following:  
{  
“error” : {  
“root\_cause” : [  
{  
“type” : “script\_exception”,  
“reason” : “runtime error”,  
“script\_stack” : [  
“”“tagsx = ctx[‘tags’];  
“””,  
" ^---- HERE"  
],  
“script” : " …“,  
“lang” : “painless”,  
“position” : {  
“offset” : 34,  
“start” : 23,  
“end” : 53  
}  
}  
],  
“type” : “script\_exception”,  
“reason” : “runtime error”,  
“script\_stack” : [  
“”“tagsx = ctx[‘tags’];  
“””,  
" ^---- HERE”  
],  
“script” : " …",  
“lang” : “painless”,  
“position” : {  
“offset” : 34,  
“start” : 23,  
“end” : 53  
},  
“caused\_by” : {  
“type” : “class\_cast\_exception”,  
“reason” : “cannot implicitly cast def [org.opensearch.ingest.ConditionalProcessor.UnmodifiableIngestList] to java.lang.String”  
}  
}  
}

anyone can help with this? many thanks 😉

---

<div class="post-metadata">

**Author:** ![feng](https://avatars.discourse-cdn.com/v4/letter/f/82dd89/32.png) [@feng](https://forum.opensearch.org/u/feng)\
**Post date:** [December 10, 2021, 5:46am UTC](https://forum.opensearch.org/t/issus-about-elasticsearch-nested-pipeline/7569/3 "2021-12-10T05:46:04Z")

</div>

issue resolved, column type can’t be changed after through a processor
