I tried to index the following json under the search index and test1 type:
{"test1" : "test1", "test2" : "test2"}
But I get the following exception:
org.elasticsearch.action.support.replication.ReplicationShardOperationFailedException:
[search][4]
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:337)
[elasticsearch-0.8.0.jar:na]
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.access$400(TransportShardReplicationOperationAction.java:198)
[elasticsearch-0.8.0.jar:na]
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:252)
[elasticsearch-0.8.0.jar:na]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[na:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[na:1.6.0_20]
at java.lang.Thread.run(Thread.java:637) [na:1.6.0_20]
Caused by: org.elasticsearch.index.mapper.MapperException: Malformed
content, a field with the same name as the type much be an object with
the properties/fields within it
at org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper.parse(XContentDocumentMapper.java:306)
[elasticsearch-0.8.0.jar:na]
at org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper.parse(XContentDocumentMapper.java:272)
[elasticsearch-0.8.0.jar:na]
at org.elasticsearch.index.shard.service.InternalIndexShard.innerIndex(InternalIndexShard.java:236)
[elasticsearch-0.8.0.jar:na]
at org.elasticsearch.index.shard.service.InternalIndexShard.index(InternalIndexShard.java:228)
[elasticsearch-0.8.0.jar:na]
at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:125)
[elasticsearch-0.8.0.jar:na]
node.data = true
at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:56)
[elasticsearch-0.8.0.jar:na]
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:328)
[elasticsearch-0.8.0.jar:na]
... 5 common frames omitted
If I change the type name, or the json content, everything works fine.
Am I missing something or is this an actual bug?
Thanks!
I tried to index the following json under the search index and test1 type:
{"test1" : "test1", "test2" : "test2"}
But I get the following exception:
org.elasticsearch.action.support.replication.ReplicationShardOperationFailedException:
[search][4]
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:337)
[elasticsearch-0.8.0.jar:na]
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.access$400(TransportShardReplicationOperationAction.java:198)
[elasticsearch-0.8.0.jar:na]
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:252)
[elasticsearch-0.8.0.jar:na]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[na:1.6.0_20]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[na:1.6.0_20]
at java.lang.Thread.run(Thread.java:637) [na:1.6.0_20]
Caused by: org.elasticsearch.index.mapper.MapperException: Malformed
content, a field with the same name as the type much be an object with
the properties/fields within it
at
org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper.parse(XContentDocumentMapper.java:306)
[elasticsearch-0.8.0.jar:na]
at
org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper.parse(XContentDocumentMapper.java:272)
[elasticsearch-0.8.0.jar:na]
at
org.elasticsearch.index.shard.service.InternalIndexShard.innerIndex(InternalIndexShard.java:236)
[elasticsearch-0.8.0.jar:na]
at
org.elasticsearch.index.shard.service.InternalIndexShard.index(InternalIndexShard.java:228)
[elasticsearch-0.8.0.jar:na]
at
org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:125)
[elasticsearch-0.8.0.jar:na]
node.data = true
at
org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:56)
[elasticsearch-0.8.0.jar:na]
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:328)
[elasticsearch-0.8.0.jar:na]
... 5 common frames omitted
If I change the type name, or the json content, everything works fine.
Am I missing something or is this an actual bug?
Thanks!
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.