1

我正在使用jdbc river弹性搜索从 MySQL 中获取批量数据。

curl -XPUT 'localhost:9200/_river/company_river/_meta' -d '{
   "type": "jdbc",
   "jdbc": {
      "driver": "com.mysql.jdbc.Driver",
      "url": "jdbc:mysql://localhost:3306/dbname",
      "user": "username",
      "password": "password",
      "sql": "select id as _id, name, date, code, status from tablename",
      "strategy": "simple",
      "poll": "2s"
   },
   "index": {
      "index": "jdbc",
      "type": "jdbc",
      "versioning": true,
      "digesting": true,
      "bulk_size": 160,
      "max_bulk_requests": 5
   }
}'

当我执行上述命令时,它不会从 MySQL 获取所有数据。表包含超过 100M 的记录。

4

0 回答 0