]> source.dussan.org Git - rspamd.git/commitdiff
[fix] add support ElasticSearch>=7 for elastic module 3355/head
authorGauthier C <gc@ac-lille.fr>
Mon, 27 Apr 2020 09:14:10 +0000 (11:14 +0200)
committerGauthier C <gc@ac-lille.fr>
Mon, 27 Apr 2020 09:14:10 +0000 (11:14 +0200)
Since version 7.x of ElasticSearch, logs type is not supported.

Close #3324

src/plugins/lua/elastic.lua

index f0d339205d0683246cbfde67239e55b039a6b2a5..f0dd98f7815f4a7e6b2191c5abc7be763f7db69f 100644 (file)
@@ -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