elasticsearch:8.7.1
I am creating index this way:
return new CreateIndexRequest.Builder()
.index(name)
.aliases(alias, new Alias.Builder().build())
.settings(new IndexSettings.Builder()
.numberOfShards(String.valueOf(shardsAmount))
.build())
.build();
I want add mapping like this:
return new CreateIndexRequest.Builder()
.index(name)
.mappings(
new TypeMapping.Builder()...
and I have no idea what next.
Can any one share example or link where I can find it?