Nested documents in ingest pipeline processor

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""
}
}
}

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