Error : mapper of different type, current_type [text], merged_type [ObjectMapper]","type":"illegal_argument_exception"

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 :

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

and my code is

// 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

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