elasticsearch-river-jdbc 不念不忘少年蓝@ 2022-03-19 08:36 183阅读 0赞 整理下elasticsearch-river-jdbc插件的用法,希望对大家有帮助。 环境:window + mysql 首先从介绍安装开始 **1.1:es version 0.20+ (使用0.20+以上版本的)** cd D:\\elasticsearch-0.20.5\\bin plugin -url http://bit.ly/Yp2Drj -install river-jdbc **1.2:es version** ** 0.90.0 Beta1+** cd D:\\elasticsearch-0.20.5\\bin plugin -url http://bit.ly/145e9Ly -install river-jdbc 经测试,以上命令无效。只有自己下载jar包 [https://bintray.com/pkg/show/general/jprante/elasticsearch-plugins/elasticsearch-river-jdbc][https_bintray.com_pkg_show_general_jprante_elasticsearch-plugins_elasticsearch-river-jdbc] **2:放一个mysql-jdbc连接jar包到lib目录下** **3:创建\_river** http://localhost:9200/_river/my_jdbc_river/_meta { "type": "jdbc", "jdbc":{ "strategy":"simple", "driver":"com.mysql.jdbc.Driver", "url":"jdbc:mysql://localhost:3306/yb_kw", "user":"", "password":"", "sql":"select * from sort", "sqlparams":null, "poll" : "1h", "rounding" : null, "scale" : 0, "autocommit" : false, "fetchsize" : 10, "max_rows" : 0, "max_retries" : 3, "max_retries_wait":"10s", "locale" : Locale.getDefault().toLanguageTag(), "digesting" : true, "acksql" : null, "acksqlparams" : null }, "index": { "index" : "gindex", "type" : "gindex", "bulk_size" : 100, "max_bulk_requests" : 30, "index_settings" : null, "type_mapping" : null, "versioning" : false, "acknowledge" : false } } 本文出自: [https://github.com/jprante/elasticsearch-river-jdbc/wiki/JDBC-River-parameters][https_github.com_jprante_elasticsearch-river-jdbc_wiki_JDBC-River-parameters] **待续……** [https_bintray.com_pkg_show_general_jprante_elasticsearch-plugins_elasticsearch-river-jdbc]: https://bintray.com/pkg/show/general/jprante/elasticsearch-plugins/elasticsearch-river-jdbc [https_github.com_jprante_elasticsearch-river-jdbc_wiki_JDBC-River-parameters]: https://github.com/jprante/elasticsearch-river-jdbc/wiki/JDBC-River-parameters
还没有评论,来说两句吧...