我试图使用mongo-connector将数据从mongodb3.6推送到elasticsearch6.1。
我的记录是:

db.administrators.find({}).pretty()
{
        "_id" : ObjectId("5701d81893dc484c812b4fc1"),
        "name" : "Test Naupada",
        "username" : "adminn",
        "ward" : "56a6129f44fc869f215fe3fe",
        "password" : "nadmin"
}

rs0:PRIMARY> db.sub_ward_master.find({}).pretty()
{
        "_id" : ObjectId("56a6129f44fc869f215fe3fe"),
        "wardCode" : "3",
        "wardName" : "Naupada",
        "wardgeoCodes" : [],
        "cityName" : "thane"
}

当我运行mongo-connector时,出现以下错误:
OperationFailed: (u'1 document(s) failed to index.', [{u'index': {u'status': 400, u'_type': u'administrators', u'_index': u'smartjn', u'error': {u'reason': u'Rejecting mapping update to [smartjn] as the final mapping would have more than 1 type: [sub_ward_master, administrators]', u'type': u'illegal_argument_exception'}, u'_id': u'5701d81893dc484c812b4fc1', u'data': {u'username': u'adminn', u'ward': u'56a6129f44fc869f215fe3fe', u'password': u'nadmin', u'name': u'Test Naupada'}}}

任何人有帮助吗?
谢谢

最佳答案

ES 6不允许在任何单个索引中创建more than one type

mongo-connector存储库中有一个open issue支持ES6。在解决该问题之前,您应该使用ES 5。

关于mongodb - 当使用mongo-connector进行管道传输时,elasticsearch 6不允许多种类型,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47919510/

10-11 07:10