Skip to content

[ML] Data frame analytics explain API errors if includes field contains a comma #72541

@peteharverson

Description

@peteharverson

The data frame analytics _explain API throws an error if one of the includes or excludes fields contains a comma , character.

For example, using the special_characters_2019 dataset, running

POST _ml/data_frame/analytics/_explain
{
   "description":"",
   "source":{
      "index":"special_characters_2019",
      "query":{
         "match_all":{
            
         }
      }
   },
   "analyzed_fields":{
      "includes":[
         "ampersand&name",
         "asterisk*name",
         "at@name",
         "colon:name",
         "comma,name"
      ]
   },
   "analysis":{
      "regression":{
         "dependent_variable":"metric%$£&!{(]field",
         "num_top_feature_importance_values":0,
         "training_percent":80
      }
   },
   "max_num_threads":1
}

Gives an error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "status_exception",
        "reason" : "No field [comma] could be detected"
      }
    ],
    "type" : "status_exception",
    "reason" : "No field [comma] could be detected"
  },
  "status" : 400
}

Metadata

Metadata

Labels

:mlMachine learning>bugTeam:MLMeta label for the ML team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions