Is it possible to create an ML job with custom rule referencing a scripted field? I'm trying to skip results during a certain period of the day. Running 6.6 Here are the relevant snippets:
In the datafeed_config section I've got this, which seems to work:
"script_fields": {
"timestamp_hour": {
"script": {
"lang": "painless",
"inline": "doc['@timestamp'].value.getHourOfDay()"
}
}
},
In the detectors section I've got this, which throws an error:
"custom_rules": [{
"actions": ["skip_result"],
"conditions": [
{
"applies_to": "timestamp_hour",
"operator": "lt",
"value": 12
}
]
}],
Error: [rule_condition] failed to parse field [applies_to]