# Document contains at least one immense term in field

**URL:** <https://forum.shopware.com/t/document-contains-at-least-one-immense-term-in-field/93115>\
**Category:** Shopware 6 (English)\
**Created:** [24. Februar 2022 um 06:53 UTC](https://forum.shopware.com/t/document-contains-at-least-one-immense-term-in-field/93115 "2022-02-24T06:53:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [24. Februar 2022 um 06:53 UTC](https://forum.shopware.com/t/document-contains-at-least-one-immense-term-in-field/93115/1 "2022-02-24T06:53:13Z")

</div>

Used Shopware Version: 6.4.8.1

I have installed the SwagEnterpriseSearchPlatform(version: 3.3.1) plugin and I am trying to Build Index by using the command` 'bin/console dal:refresh: index'`

I am getting the following error

```auto
  Following errors occurred while indexing:                                    
  Document contains at least one immense term in field="customFields.xxx" (whose UTF8 encoding is longer than the max length 3276  
  6), all of which were skipped. Please correct the analyzer to not produce   
  such terms. The prefix of the first immense term is: '[60, 112, 62, 10, 10  
  , 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 3  
  2, 32, 32, 32, 32, 32, 32]...', original message: bytes can be at most 3276  
  6 in length; got 44528                                                       
  #Document contains at least one immense term in field="customFields. xxxx" (whose UTF8 encoding is longer than the max length 327  
  66), all of which were skipped. Please correct the analyzer to not produce  
   such terms. The prefix of the first immense term is: '[60, 112, 62, 10, 1  
  0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,   
  32, 32, 32, 32, 32, 32, 32]...', original message: bytes can be at most 327  
  66 in length; got 45540

```

There was an issue reported in the issue tracker [Shopware Issuetracker](https://issues.shopware.com/issues/NEXT-9527). it shows that issue was fixed in 6.4.0.0 RC. but I am getting the same error

The following is my custom field  
[‚name‘ =\> ‚xxxxx‘, ‚type‘ =\> CustomFieldTypes::HTML, ‚config‘ =\> [ ‚componentName‘ =\> ‚sw-text-editor‘, ‚customFieldType‘ =\> ‚textEditor‘, ‚label‘ =\> [ ‚en-GB‘ =\> ‚Product Information (Rich Content)‘, ‚de-DE‘ =\> ‚Hersteller Produkttext (Rich Content)‘, ‚de-AT‘ =\> ‚Hersteller Produkttext (Rich Content)‘,], ‚customFieldPosition‘ =\> 5, ], ],

Plugin settings:

I have added the following environment variables in .env file SHOPWARE\_ES\_HOSTS=elasticsearch:9200 SHOPWARE\_ES\_ENABLED=1 SHOPWARE\_ES\_INDEXING\_ENABLED=1 SHOPWARE\_ES\_INDEX\_PREFIX=sw

[Screenshot%20from%202022-02-24%2010-43-53.png](https://sbp-issuetracker-attachments.s3.eu-west-1.amazonaws.com/1645682507_62171f4bc5436_1645682396_62171edc25600_Screenshot%20from%202022-02-24%2010-43-53.png)

---

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [11. März 2022 um 05:53 UTC](https://forum.shopware.com/t/document-contains-at-least-one-immense-term-in-field/93115/2 "2022-03-11T05:53:20Z")

</div>

It was a bug

> **[Shopware Issuetracker](https://issues.shopware.com/issues/NEXT-20285)**
>
> Shopware Issuetracker

The HTML and text fields are mapped as keywords in elastic search.

HTML and text fields must be mapped as text in development/vendor/shopware/platform/src/Elasticsearch/Product/CustomFieldUpdater.php:104

the keywords have a limit of 32766 bytes.
