testmysqltoelasticsearch74.json 未测试,仅参考

{

  "job": {

    "setting": {

        "speed": {

            "channel": 1

        }

    },

    "content": [

      {

        "reader": {

          ...

        },

        "writer": {

          "name": "elasticsearchwriter",

          "parameter": {

            "endpoint": "http://xxx:9999",

            "accessId": "xxxx",

            "accessKey": "xxxx",

            "index": "test-1",

            "type": "default",

            "cleanup": true,

            "settings": {"index" :{"number_of_shards": 1, "number_of_replicas": 0}},

            "discovery": false,

            "batchSize": 1000,

            "splitter": ",",

            "column": [

              {"name": "pk", "type": "id"},

              { "name": "col_ip","type": "ip" },

              { "name": "col_double","type": "double" },

              { "name": "col_long","type": "long" },

              { "name": "col_integer","type": "integer" },

              { "name": "col_keyword", "type": "keyword" },

              { "name": "col_text", "type": "text", "analyzer": "ik_max_word"},

              { "name": "col_geo_point", "type": "geo_point" },

              { "name": "col_date", "type": "date", "format": "yyyy-MM-dd HH:mm:ss"},

              { "name": "col_nested1", "type": "nested" },

              { "name": "col_nested2", "type": "nested" },

              { "name": "col_object1", "type": "object" },

              { "name": "col_object2", "type": "object" },

              { "name": "col_integer_array", "type":"integer", "array":true},

              { "name": "col_geo_shape", "type":"geo_shape", "tree": "quadtree", "precision": "10m"}

            ]

          }

        }

      }

    ]

  }

 

}

 

posted @ 2021-09-08 14:49  DarJeely  阅读(20)  评论(0编辑  收藏  举报