ドキュメントの 1 つに対して、次のインデックス マッピングを定義しました。
{
"favorites":{
"_parent":{
"type":"activities"
},
"properties":{
"favorite_count":{
"type":"integer"
},
"details":{
"type":"integer",
"store":"yes"
}
}
}
}
次のドキュメントのインデックスを作成しようとすると:
{
"favorite_count":3,
"details":[
1, 25, 4
]
}
次の例外が発生します。
org.elasticsearch.index.mapper.MapperParsingException: object mapping [details] trying to serialize a value with no field associated with it, current value [1]
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:595)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:599)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray(ObjectMapper.java:587)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:459)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:507)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:451)
at org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:329)
at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:203)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
このリンクhttp://www.elasticsearch.org/guide/reference/mapping/array-type/から、インデックス マッピングに問題はないと思います。私は何を間違っていますか?