Using Lua scripts for `per_user` classifier not work on 2.2
Opened this issue · 0 comments
dacapoday commented
Now at version 2.2. redis key isn't include per_user name, it only have RS_.
But before 2.0, i can use my custom userid for per_user.
my config is:
classifier "bayes" {
tokenizer {
name = "osb";
}
name = "base";
backend = "redis";
min_tokens = 11;
min_learns = 200;
autolearn = false;
new_schema = true;
per_user = <<EOD
return function(task)
local rcpt = task:get_header('USER_ID')
if (rcpt ~= nil and rcpt ~= '') then
return rcpt
end
return nil
end
EOD
statfile {
symbol = "BAYES_HAM";
spam = false;
}
statfile {
symbol = "BAYES_SPAM";
spam = true;
}
learn_condition = 'return require("lua_bayes_learn").can_learn';
}
feature require "Using Lua scripts for per_user
classifier".
Does this feature still work?