# Nested documents in ingest pipeline processor

**URL:** <https://discuss.elastic.co/t/nested-documents-in-ingest-pipeline-processor/135305>\
**Category:** Elasticsearch\
**Created:** [June 11, 2018, 8:09am UTC](https://discuss.elastic.co/t/nested-documents-in-ingest-pipeline-processor/135305 "2018-06-11T08:09:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gourmax](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@gourmax](https://discuss.elastic.co/u/gourmax)\
**Post date:** [June 11, 2018, 8:09am UTC](https://discuss.elastic.co/t/nested-documents-in-ingest-pipeline-processor/135305/1 "2018-06-11T08:09:37Z")

</div>

I'm trying to use a pipeline gsub processor for a nested document before indexing my all document.

Here is my simulation, but it doesn't work. Is there any way to process a nested document ?  
I don't understand why the processor gsub try to analyse my field as an integer...

```
POST _ingest/pipeline/_simulate
{
  "pipeline" :
  {
    "description": "_description",
    "processors": [
      {
        "gsub" : {
        "field" : "Mesures.ResultatQT",
        "pattern" : ",",
        "replacement": "."
        }
      }
    ]
  },
  "docs": [
    {
      "_index": "index",
      "_type": "_doc",
      "_id": "id",
      "_source": {
        "Mesures": [
	  	{
			"ResultatQT": "0.1"
		  },
		{
			"ResultatQT": "0,08"
		}
	    ]
  }
},
{
  "_index": "index",
  "_type": "_doc",
  "_id": "id",
  "_source": {
	  "Mesures": [
	  	{
			"ResultatQT": "0,451"
		  },
		{
			"ResultatQT": "0,08"
		}
    ]
    }
    }
  ]
}

```

Here is my error:

> "caused\_by": {  
> "type": "illegal\_argument\_exception",  
> "reason": "java.lang.IllegalArgumentException: [ResultatQT] is not an integer, cannot be used as an index as part of path [Mesures.ResultatQT]",  
> "caused\_by": {  
> "type": "illegal\_argument\_exception",  
> "reason": "[ResultatQT] is not an integer, cannot be used as an index as part of path [Mesures.ResultatQT]",  
> "caused\_by": {  
> "type": "number\_format\_exception",  
> "reason": "For input string: "ResultatQT""  
> }  
> }  
> }

---

<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:** [July 9, 2018, 8:09am UTC](https://discuss.elastic.co/t/nested-documents-in-ingest-pipeline-processor/135305/2 "2018-07-09T08:09:38Z")

</div>

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