commit c946d45: [fix] add support ElasticSearch>=7 for elastic module

Gauthier C gc at ac-lille.fr
Sun May 3 19:14:06 UTC 2020


Author: Gauthier C
Date: 2020-04-27 11:14:10 +0200
URL: https://github.com/rspamd/rspamd/commit/c946d45b1b91b19048560a6c8bb75ae6e05a0d0c (refs/pull/3355/head)

[fix] add support ElasticSearch>=7 for elastic module
Since version 7.x of ElasticSearch, logs type is not supported.

Close #3324

---
 src/plugins/lua/elastic.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
 


More information about the Commits mailing list