aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_stat.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-04-06 15:39:19 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-04-06 15:39:19 +0100
commitd07edfa195c7e166cee4b30e7dea6c17a12e169b (patch)
tree0f5b8f779effd2225eda0433bae6962b566970f9 /lualib/lua_stat.lua
parentebc1286073fb291de96adc97e5305234cfb3b6c0 (diff)
downloadrspamd-d07edfa195c7e166cee4b30e7dea6c17a12e169b.tar.gz
rspamd-d07edfa195c7e166cee4b30e7dea6c17a12e169b.zip
[Minor] Disable headers hash for statistics
Discussed with: @moisseev
Diffstat (limited to 'lualib/lua_stat.lua')
-rw-r--r--lualib/lua_stat.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lualib/lua_stat.lua b/lualib/lua_stat.lua
index 2606a8d22..920f20205 100644
--- a/lualib/lua_stat.lua
+++ b/lualib/lua_stat.lua
@@ -678,6 +678,10 @@ local function get_mime_stat_tokens(task, res, i)
end
local function get_headers_stat_tokens(task, cf, res, i)
+ --[[
+ -- As discussed with Alexander Moisseev, this feature can skew statistics
+ -- especially when learning is separated from scanning, so learning
+ -- has a different set of tokens where this token can have too high weight
local hdrs_cksum = task:get_mempool():get_variable("headers_hash")
if hdrs_cksum then
@@ -686,6 +690,7 @@ local function get_headers_stat_tokens(task, cf, res, i)
res[i])
i = i + 1
end
+ ]]--
for k,hdrs in pairs(cf.classify_headers_parsed) do
for _,hname in ipairs(hdrs) do