# Anomaly detection fails with Document contains at least one immense term in field="model.normalized\_keyword" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped

**URL:** <https://forum.opensearch.org/t/anomaly-detection-fails-with-document-contains-at-least-one-immense-term-in-field-model-normalized-keyword-whose-utf8-encoding-is-longer-than-the-max-length-32766-all-of-which-were-skipped/7136>\
**Category:** Machine Learning\
**Created:** [September 29, 2021, 7:26am UTC](https://forum.opensearch.org/t/anomaly-detection-fails-with-document-contains-at-least-one-immense-term-in-field-model-normalized-keyword-whose-utf8-encoding-is-longer-than-the-max-length-32766-all-of-which-were-skipped/7136 "2021-09-29T07:26:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harishram](https://avatars.discourse-cdn.com/v4/letter/h/d78d45/32.png) [@Harishram](https://forum.opensearch.org/u/Harishram)\
**Post date:** [September 29, 2021, 7:26am UTC](https://forum.opensearch.org/t/anomaly-detection-fails-with-document-contains-at-least-one-immense-term-in-field-model-normalized-keyword-whose-utf8-encoding-is-longer-than-the-max-length-32766-all-of-which-were-skipped/7136/1 "2021-09-29T07:26:47Z")

</div>

Hi All,  
I am trying to create an anomaly detection model on a simple index with around 5 float fields.  
On initialization of the detector, it fails in the UI. The detailed logger error is  
Document contains at least one immense term in field=“model.normalized\_keyword” (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: ‘[114, 110, 103, 32, 100, 105, 109, 101, 110, 115, 105, 111, 110, 115, 32, 49, 32, 115, 97, 109, 112, 108, 101, 115, 105, 122, 101, 32, 50, 53]…’, original message: bytes can be at most 32766 in length; got 1442859. How do I resolve this error? Thanks in advance

---

<div class="post-metadata">

**Author:** ![ylwu](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@ylwu](https://forum.opensearch.org/u/ylwu)\
**Post date:** [October 13, 2021, 11:23pm UTC](https://forum.opensearch.org/t/anomaly-detection-fails-with-document-contains-at-least-one-immense-term-in-field-model-normalized-keyword-whose-utf8-encoding-is-longer-than-the-max-length-32766-all-of-which-were-skipped/7136/2 "2021-10-13T23:23:13Z")

</div>

hi, @Harishram , sorry to reply so late, can you share your detector configuration and the data source index mapping? And which ODFE/OpenSearch version are you running?
