I'm adding a dynamic template so that, by default, string types are not
analyzed in my index. The code worked fine in 0.16.1, but when I upgraded to
0.16.2 I get an ActionRequestValidationException:
Caused by: org.elasticsearch.action.ActionRequestValidationException:
Validation Failed: 1: mapping type is missing
at org.elasticsearch.action.Actions.addValidationError(Actions.java:32)
at
org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest.validate(PutMappingRequest.java:80)
at org.elasticsearch.action.support.BaseAction.execute(BaseAction.java:55)
at
org.elasticsearch.client.node.NodeIndicesAdminClient.putMapping(NodeIndicesAdminClient.java:223)
at
org.elasticsearch.client.action.admin.indices.mapping.put.PutMappingRequestBuilder.doExecute(PutMappingRequestBuilder.java:116)
Any input into what I need to change for 0.16.2 would be appreciated. I
didn't see anything obvious when looking through the changelogs, but I
obviously missed something. I looked at http://www.elasticsearch.org/guide/reference/mapping/root-object-type.html and
didn't notice anything different than what it was when I originally
implemented this.
Just add setType to the put mapping request with "default" as value. There were some corner cases when the mapping was not provided, so now its required.
On Wednesday, June 15, 2011 at 2:29 AM, Bob Jacoby wrote:
I'm adding a dynamic template so that, by default, string types are not analyzed in my index. The code worked fine in 0.16.1, but when I upgraded to 0.16.2 I get an ActionRequestValidationException:
Caused by: org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: mapping type is missing
at org.elasticsearch.action.Actions.addValidationError(Actions.java:32)
at org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest.validate(PutMappingRequest.java:80)
at org.elasticsearch.action.support.BaseAction.execute(BaseAction.java:55)
at org.elasticsearch.client.node.NodeIndicesAdminClient.putMapping(NodeIndicesAdminClient.java:223)
at org.elasticsearch.client.action.admin.indices.mapping.put.PutMappingRequestBuilder.doExecute(PutMappingRequestBuilder.java:116)
Any input into what I need to change for 0.16.2 would be appreciated. I didn't see anything obvious when looking through the changelogs, but I obviously missed something. I looked at Elasticsearch Platform — Find real-time answers at scale | Elastic and didn't notice anything different than what it was when I originally implemented this.
Wow! Now that was a fast response. I was looking in the completely wrong
place since I just assumed my source was wrong (which it is 99% of the
time). Thanks for saving me even more time down that rabbit hole!
Just add setType to the put mapping request with "default" as value.
There were some corner cases when the mapping was not provided, so now its
required.
On Wednesday, June 15, 2011 at 2:29 AM, Bob Jacoby wrote:
I'm adding a dynamic template so that, by default, string types are not
analyzed in my index. The code worked fine in 0.16.1, but when I upgraded to
0.16.2 I get an ActionRequestValidationException:
Caused by: org.elasticsearch.action.ActionRequestValidationException:
Validation Failed: 1: mapping type is missing
at org.elasticsearch.action.Actions.addValidationError(Actions.java:32)
at
org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest.validate(PutMappingRequest.java:80)
at
org.elasticsearch.action.support.BaseAction.execute(BaseAction.java:55)
at
org.elasticsearch.client.node.NodeIndicesAdminClient.putMapping(NodeIndicesAdminClient.java:223)
at
org.elasticsearch.client.action.admin.indices.mapping.put.PutMappingRequestBuilder.doExecute(PutMappingRequestBuilder.java:116)
Any input into what I need to change for 0.16.2 would be appreciated. I
didn't see anything obvious when looking through the changelogs, but I
obviously missed something. I looked at Elasticsearch Platform — Find real-time answers at scale | Elastic and
didn't notice anything different than what it was when I originally
implemented this.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.