0

使用 jdbc 驱动程序从 mysql 数据库更新 elasticsearch 时,我遇到了数据丢失的问题。我的河在下面:

curl -XPUT 'http://localhost:9200/_river/river_index_type/_meta' -d '
{
    "type": "jdbc",
    "jdbc": {
        "strategy": "simple",
        "driver": "com.mysql.jdbc.Driver",
        "url": "jdbc:mysql://localhost/tt",
        "user": "user",
        "password": "password",
        "sql": "SELECT p.product_id AS _id, ... FROM product p ... WHERE ...",
        "poll": "5m",
        "autocommit": true
    },
    "index": {
        "type": "type",
        "index": "index"
    }
}

最初一切正常,但后来,我的索引中的结果不是 1200,而是只有 800-900,并且每五分钟计数就会改变。我不明白问题是什么。任何帮助,将不胜感激。

4

0 回答 0