# How to index null values/ empty array thru Ingest Pipeline

**URL:** https://discuss.elastic.co/t/how-to-index-null-values-empty-array-thru-ingest-pipeline/267256
**Category:** Elasticsearch
**Tags:** ingest-pipeline
**Created:** [March 15, 2021, 12:07pm UTC](https://discuss.elastic.co/t/how-to-index-null-values-empty-array-thru-ingest-pipeline/267256 "2021-03-15T12:07:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sravankayitha](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sravankayitha](https://discuss.elastic.co/u/sravankayitha)
#### Post date: [March 15, 2021, 12:07pm UTC](https://discuss.elastic.co/t/how-to-index-null-values-empty-array-thru-ingest-pipeline/267256/1 "2021-03-15T12:07:40Z")

</div>

Hello,

I'm new to ES, Can any one suggest me How to resolve this issue:  
Pipeline name: cpqtest2602  
Actual default index: cpqtest26\*  
Unformatted index: unformatted2602\*

I'm trying to index the null values/empty array with the below set processor i can index it to Actual default index: cpqtest26\*, but i want index it to Unformatted index: unformatted2602\*  
PUT /\_ingest/pipeline/cpqtest2602  
{  
"description" : "Pipeline to extract the data and create error index",  
"processors" : [  
{  
"set" : {  
"if": "ctx.message == 'null'",  
"field": "message",  
"value": "na",  
"ignore\_empty\_value": false,  
"override": true  
}  
}  
]  
}

---

<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: [April 12, 2021, 12:08pm UTC](https://discuss.elastic.co/t/how-to-index-null-values-empty-array-thru-ingest-pipeline/267256/2 "2021-04-12T12:08:00Z")

</div>

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