TransportClient: InvalidTypeNameException prepareCreate addMapping

I'm attempting to work with the JAVA API to create mapping types and I'm following the Java API documentation for managing indices (https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-admin-indices.html). I have valid JSON and if I copy and paste the JSON into Kibana and manually add the mapping it creates without issue.

Following the section "The PUT mapping API allows you to add a new type while creating an index:" in the docs I get the error "Type name too long" because its trying to parse the entire JSON string as the type name.

I created a bug report but wanted to see if I'm just doing this wrong:

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