# Ingest pipeline for nested type

**URL:** <https://discuss.elastic.co/t/ingest-pipeline-for-nested-type/215235>\
**Category:** Elasticsearch\
**Created:** [January 16, 2020, 4:43am UTC](https://discuss.elastic.co/t/ingest-pipeline-for-nested-type/215235 "2020-01-16T04:43:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaileshgaikwad](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@shaileshgaikwad](https://discuss.elastic.co/u/shaileshgaikwad)\
**Post date:** [January 16, 2020, 4:43am UTC](https://discuss.elastic.co/t/ingest-pipeline-for-nested-type/215235/1 "2020-01-16T04:43:10Z")

</div>

I am trying to use Ingest pipeline for nested object and I am getting error.

```
        "type" : "ingest_processor_exception",
        "reason" : "java.lang.IllegalArgumentException: field [content] not present as part of path [content]",

```

This is my Index which has nested type..

```
    {
    "settings": {
    "index": {
    "analysis": {
    "analyzer": {
    "windows_path_hierarchy_analyzer": {
    "type": "custom",
    "tokenizer": "windows_path_hierarchy_tokenizer"
    }
    },
    "tokenizer": {
    "windows_path_hierarchy_tokenizer": {
    "type": "path_hierarchy",
    "delimiter": "\"
    }
    }
    },
    "number_of_shards": "1",
    "number_of_replicas": "1"
    }
    },
    "mappings": {
    "_doc": {
    "properties": {
    "casePartList": {
    "type": "nested"
    },
    "isRead": {
    "type": "boolean"
    },
    "CreationDate": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "userId": {
    "type": "keyword"
    },
    "titleKey": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "regimeNumber": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "documentList": {
    "type": "nested",
    "properties": {
    "path": {
    "analyzer": "windows_path_hierarchy_analyzer",
    "type": "text"
    },
    "attachment": {
    "properties": {
    "date": {
    "type": "date"
    },
    "indexed_chars": {
    "type": "long"
    },
    "content_type": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "keywords": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "author": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "containsMetadata": {
    "type": "boolean"
    },
    "name": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "language": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "title": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "content": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "content_length": {
    "type": "long"
    },
    "detect_language": {
    "type": "boolean"
    }
    }
    },
    "id": {
    "type": "integer"
    },
    "documentTitle": {
    "type": "keyword"
    },
    "incidentId": {
    "type": "integer"
    },
    "content": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    }
    }
    },
    "caseId": {
    "type": "integer"
    },
    "regimeName": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "caseName": {
    "type": "keyword"
    },
    "folderName": {
    "type": "text",
    "fields": {
    "keyword": {
    "ignore_above": 256.0,
    "type": "keyword"
    }
    }
    },
    "iD": {
    "type": "integer"
    },
    "incidentId": {
    "type": "integer"
    }
    }
    }
    }
    }

```

my ingest pipeline is

`{"description":"Document attachment pipeline","processors":[{"attachment":{"field":"content","target_field":"attachment"}},{"remove":{"field":["content"]}}]}`

Actual C# Code using NEST:  
var IngestPipeline = \_esProvider.Client.Ingest.PutPipeline("attachments", p =\> p  
.Description("Document attachment pipeline")

```
                        .Processors(pr => pr
                       
                        .Attachment<Document>(a => a
                           
                            .Field(f => f.Content)
                            
                            .TargetField(f => f.Attachment)
                           
                          )
                               .Remove<Document>(r => r
                  .Field(f => f.Field(cx => cx.Content))
              )
                        )
                        );

        } 

```

Index is getting created but when i try to create document it gives below error

"type" : "ingest\_processor\_exception",  
"reason" : "java.lang.IllegalArgumentException: field [content] not present as part of path [content]",

I think my ingest pipeline is not properly mapped with Document type which is nested type of Incident.

I am new to elastic search. Can you please guide me for this issue?

---

<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:** [February 13, 2020, 4:43am UTC](https://discuss.elastic.co/t/ingest-pipeline-for-nested-type/215235/2 "2020-02-13T04:43:14Z")

</div>

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