CreateIndexRequest is failing

I have problem with create index.
Using ELK 7.3
Getting error: MapperParsingException[Failed to parse mapping [properties]: Root mapping definition has unsupported parameters:
on request:

CreateIndexRequest request = new CreateIndexRequest(indexName);
request.source(task, XContentType.JSON);

where task is loaded from file https://pastebin.com/T8cpurpm