# Detector field "mlcategory" is not an aggregatable field

**URL:** <https://discuss.elastic.co/t/detector-field-mlcategory-is-not-an-aggregatable-field/142432>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [July 31, 2018, 6:53pm UTC](https://discuss.elastic.co/t/detector-field-mlcategory-is-not-an-aggregatable-field/142432 "2018-07-31T18:53:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 31, 2018, 6:53pm UTC](https://discuss.elastic.co/t/detector-field-mlcategory-is-not-an-aggregatable-field/142432/1 "2018-07-31T18:53:57Z")

</div>

I create a job in 6.3.1, with categorization\_field\_name set to "message", and try to count by mlcategory. When I Validate Job I get the error message in the title. However, I am able to save and run the job. The job looks like this

```
{
  "job_id": "the-unusual-suspects",
  "description": "",
  "groups": [],
  "analysis_config": {
    "bucket_span": "15m",
    "influencers": [
      "beat.hostname.keyword"
    ],
    "detectors": [
      {
        "function": "count",
        "by_field_name": "mlcategory"
      }
    ],
    "categorization_field_name": "message"
  },
  "data_description": {
    "time_field": "@timestamp"
  },
  "datafeed_config": {
    "query": {
      "match_all": {}
    },
    "indices": [
      "logstash-production*"
    ],
    "types": []
  }
}
```

---

<div class="post-metadata">

**Author:** ![walterra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walterra/32/139867_2.png) [@walterra](https://discuss.elastic.co/u/walterra)\
**Post date:** [August 1, 2018, 11:10am UTC](https://discuss.elastic.co/t/detector-field-mlcategory-is-not-an-aggregatable-field/142432/2 "2018-08-01T11:10:37Z")

</div>

Thanks for reporting this. It's a known issue and will be fixed with the release of 6.4. (Here's the corresponding issue on github: [https://github.com/elastic/kibana/issues/20867](https://github.com/elastic/kibana/issues/20867))

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 29, 2018, 10:04pm UTC](https://discuss.elastic.co/t/detector-field-mlcategory-is-not-an-aggregatable-field/142432/3 "2018-10-29T22:04:21Z")

</div>


