I've just encountered a regression bug, and I'm not sure if it is related
to a recent change in elasticsearch.
I am attempting to index the following JSON document.
[
{
"dataType": "posts",
"spam": 0,
"likes": 0,
"views": 0,
"active": true,
"dateCreated": "2011-11-30T15:43:48Z",
"type": "comment",
"creator": {
"_id": "9471705a52bb429aa3931c682f4a53c7",
"username": "malayed1",
"thumbnail": {
"idSource": "profiles-0000-0000-0000-000000000001",
"idCrop": "profiles-0000-0000-0000-000000000001"
},
"fullName": "Mohamed Al Ayed",
"dataType": "profiles"
},
"title": "",
"message": "
Great idea for a new company.
","likedBy": [],
"lastModifiedDate": "2011-11-30T15:43:48Z",
"threadId": "f49d43ac71774c5aa08f96a66b257ca0",
"parentId": "7669edcfac4c4c75bfc93f698ecd3292",
"_id": "f49d43ac71774c5aa08f96a66b257ca0"
}
]
It is valid JSON, but ES is failing to parse it and throwing an exception.
org.elasticsearch.index.mapper.MapperParsingException: Failed to parse
[active]
at
org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:308)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:577)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:443)
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:468)
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:409)
at
org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:302)
at
org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:181)
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:487)
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:400)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.elasticsearch.common.jackson.JsonParseException: Current
token (VALUE_TRUE) not numeric, can not use numeric value accessors
at [Source: [B@344026c1; line: 1, column: 63]