【问题标题】:Elasticsearch integration with mongoDB on windows7Windows7 上 Elasticsearch 与 mongoDB 的集成
【发布时间】:2012-05-22 01:03:06
【问题描述】:

当我跑步时

    curl -XPUT 'http://localhost:9200/_river/test/_meta' -d '{
    "type": "mongodb",
    "mongodb": {
        "db": "test",
        "collection": "es_test"
    },
    "index": {
        "name": "mongoindex",
        "type": "es_test"
    }
}'

我收到以下异常:

 {"error":"MapperParsingException[Failed to parse]; nested:JsonParseException[Unexpected character ('m' (code 109)): expected a valid value (number,String, array, object, 'true', 'false' or 'null')\n at [Source:[B@61f133ea; line:1, column:8]]; ","status":400}

我自己进行了研究,发现elasticsearch usersMongoDB River Plugin for ElasticSearch...试图按所示实施,但有相同的错误.... 如果有人有在 Windows7 环境中使用 ES 的经验, 你能指出我做错了什么吗?我完全陌生 ElasticSearch 并感谢您的帮助。

【问题讨论】:

    标签: mongodb elasticsearch


    【解决方案1】:

    它对我有用。也许你在打字时在你的 shell 中有一个假字符?尝试将它放在一个文件中并使用 shell 运行它。

    【讨论】:

    • 在mongodb中需要使用replSet吗?
    • 不确定,但这不会对正确配置河流产生影响。
    • Mongo DB 需要设置一个 oplog 才能与 River 组件一起使用。 oplog 通常用于 MongoDB 的副本集中。出于测试目的,您可以为单节点 MongoDB 启用 oplog 以使其与河流一起工作。看看下面的文章:loosexaml.wordpress.com/2012/09/03/…
    猜你喜欢
    • 2018-03-02
    • 1970-01-01
    • 2017-01-11
    • 2020-12-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多