# Pipeline creation with multiple fields

**URL:** <https://discuss.elastic.co/t/pipeline-creation-with-multiple-fields/343635>\
**Category:** Elastic Search\
**Tags:** painless, elastic-app-search\
**Created:** [September 22, 2023, 3:20pm UTC](https://discuss.elastic.co/t/pipeline-creation-with-multiple-fields/343635 "2023-09-22T15:20:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manasa4](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Manasa4](https://discuss.elastic.co/u/Manasa4)\
**Post date:** [September 22, 2023, 3:20pm UTC](https://discuss.elastic.co/t/pipeline-creation-with-multiple-fields/343635/1 "2023-09-22T15:20:00Z")

</div>

Hi,  
I have created a pipeline for NER with a single "field\_map", but I want a pipeline which can process multiple fields. Is that possible in the real case scenario?  
PUT \_ingest/pipeline/ner  
{  
"description": "NER pipeline",  
"processors": [  
{  
"inference": {  
"model\_id": "elastic\_\_distilbert-base-uncased-finetuned-conll03-english",  
"target\_field": "ml.ner",  
"field\_map": {  
"paragraph": "text\_field"  
}  
}  
},  
{  
"script": {  
"lang": "painless",  
"if": "return ctx['ml']['ner'].containsKey('entities')",  
"source": "Map tags = new HashMap(); for (item in ctx['ml']['ner']['entities']) { if (!tags.containsKey(item.class\_name)) tags[item.class\_name] = new HashSet(); tags[item.class\_name].add(item.entity);} ctx['tags'] = tags;"  
}  
}  
],  
"on\_failure": [  
{  
"set": {  
"description": "Index document to 'failed-'",  
"field": "\_index",  
"value": "failed-{{{ \_index }}}"  
}  
},  
{  
"set": {  
"description": "Set error message",  
"field": "ingest.failure",  
"value": "{{\_ingest.on\_failure\_message}}"  
}  
}  
]  
}

For the above pipeline creation, instead of paragraph, I also want to pass "Description" and "Title" fields.  
Is it possible in the real case scenario? Please help me on this.

---

<div class="post-metadata">

**Author:** ![Priscilla\_Parodi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priscilla_parodi/32/43047_2.png) [@Priscilla\_Parodi](https://discuss.elastic.co/u/Priscilla_Parodi)\
**Post date:** [September 23, 2023, 9:56pm UTC](https://discuss.elastic.co/t/pipeline-creation-with-multiple-fields/343635/2 "2023-09-23T21:56:34Z")

</div>

Hello @Manasa4,

It is possible. You can add other inference processors, but now for the "Description" and "Title" fields.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 21, 2023, 9:57pm UTC](https://discuss.elastic.co/t/pipeline-creation-with-multiple-fields/343635/3 "2023-10-21T21:57:13Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
