From: Gauthier C Date: Mon, 27 Apr 2020 09:14:10 +0000 (+0200) Subject: [fix] add support ElasticSearch>=7 for elastic module X-Git-Tag: 2.6~458^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F3355%2Fhead;p=rspamd.git [fix] add support ElasticSearch>=7 for elastic module Since version 7.x of ElasticSearch, logs type is not supported. Close #3324 --- diff --git a/src/plugins/lua/elastic.lua b/src/plugins/lua/elastic.lua index f0d339205..f0dd98f78 100644 --- a/src/plugins/lua/elastic.lua +++ b/src/plugins/lua/elastic.lua @@ -71,7 +71,7 @@ local function elastic_send_data(task) local tbl = {} for _,value in pairs(rows) do table.insert(tbl, '{ "index" : { "_index" : "'..es_index.. - '", "_type" : "logs" ,"pipeline": "rspamd-geoip"} }') + '", "_type" : "_doc" ,"pipeline": "rspamd-geoip"} }') table.insert(tbl, ucl.to_format(value, 'json-compact')) end