# Error : mapper of different type, current\_type \[text\], merged\_type \[ObjectMapper\]","type":"illegal\_argument\_exception"

**URL:** <https://discuss.elastic.co/t/error-mapper-of-different-type-current-type-text-merged-type-objectmapper-type-illegal-argument-exception/240018>\
**Category:** Elasticsearch\
**Created:** [July 6, 2020, 2:01pm UTC](https://discuss.elastic.co/t/error-mapper-of-different-type-current-type-text-merged-type-objectmapper-type-illegal-argument-exception/240018 "2020-07-06T14:01:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![imene](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/imene/32/71672_2.png) [@imene](https://discuss.elastic.co/u/imene)\
**Post date:** [July 6, 2020, 2:01pm UTC](https://discuss.elastic.co/t/error-mapper-of-different-type-current-type-text-merged-type-objectmapper-type-illegal-argument-exception/240018/1 "2020-07-06T14:01:21Z")

</div>

i want to index my data to elasticsearch so i create a pipeline in java to do that

My data is in form for example :

```auto
 {"insertId":"..........6PUYlYY.05Ku1RDDSQJmsg","jsonPayload":{"AssJRes.time":"","C4-begin.time":"","Extr3.time":""},"timestamp":"2020-06-09T11:05:33.559000015Z"} 

```

and my code is

```auto
// public class MyPipeline extends Pipeline {
	@Override
	public void onRecord(Record record) throws Exception {
		//
		// Build you pipeline here
		//{"insertId":"..........5HmP8Jjx4EhPt9b1ftXQLM","jsonPayload":{"AssJRes.time":},timestamp
		//
		
		TypedMap log = getParser().grok(record.getRaw(),"%{TEXT:json}");
		TypedMap logMap = getParser().json(log.getString("json"));
	
getElasticsearch("apigee-nonprd-gcp","main").index("preprod-apigee", record.getHash(), logMap);
		}

	}

```

but i get this error

{"nbIndexes":0,"nbUpdates":0,"nbErrors":35,"firstError":{"reason":"mapper [jsonPayload.request] of different type, current\_type [text], merged\_type [ObjectMapper]","type":"illegal\_argument\_exception"}}

Anyone can plz help to understand what is the problem

---

<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:** [August 3, 2020, 2:01pm UTC](https://discuss.elastic.co/t/error-mapper-of-different-type-current-type-text-merged-type-objectmapper-type-illegal-argument-exception/240018/2 "2020-08-03T14:01:21Z")

</div>

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