我使用以下信息创建了 ES(带有 MongoDB River 插件)索引:
{
"type": "mongodb",
"mongodb": {
"db": "mydatabase",
"collection": "Users"
},
"index": {
"name": "users",
"type": "user"
}
}
当我插入简单的对象时:
{
"name": "Joe",
"surname": "Black"
}
一切正常(我可以使用 ES Head Web 界面查看数据)。但是当我插入更大的对象时,它不会索引它:
{
"object": {
"text": "Let's do it again!",
"boolTest": false
},
"type": "coolType",
"tags": [
""
],
"subObject1": {
"count": 0,
"last3": [],
"array": []
},
"subObject2": {
"count": 0,
"last3": [],
"array": []
},
"subObject3": {
"count": 0,
"last3": [],
"array": []
},
"usrID": "5141a5a4d8f3a79c09000001",
"created": Date(1363527664000),
"lastUpdate": Date(1363527664000)
}
请问哪里有问题?
谢谢您的帮助!
编辑:这是来自 ES 控制台的错误:
org.elasticsearch.index.mapper.MapperParsingException:[stream] 的对象映射试图解析为对象,但得到了 EOF,是否提供了具体值?在 org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:457) 在 org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:486) 在 org.elasticsearch.index.mapper.DocumentMapper .parse(DocumentMapper.java:430) 在 org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:318) 在 org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:157) 在org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java: