# Can not create a custom normalizer using char filter \[html\_strip\]

**URL:** https://discuss.elastic.co/t/can-not-create-a-custom-normalizer-using-char-filter-html-strip/349939
**Category:** Elasticsearch
**Created:** [December 26, 2023, 10:03am UTC](https://discuss.elastic.co/t/can-not-create-a-custom-normalizer-using-char-filter-html-strip/349939 "2023-12-26T10:03:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![voaix](https://avatars.discourse-cdn.com/v4/letter/v/c77e96/32.png) [@voaix](https://discuss.elastic.co/u/voaix)
#### Post date: [December 26, 2023, 10:03am UTC](https://discuss.elastic.co/t/can-not-create-a-custom-normalizer-using-char-filter-html-strip/349939/1 "2023-12-26T10:03:45Z")

</div>

Hello,  
I try to save the custom normalizer as part of composite template. Receiving below error:

```auto
illegal_argument_exception', 'Custom normalizer [lower_normalizer] may not use char filter [html_strip]

```

Normalizer is defined as below:

```auto
{
    "template": {
        "settings": {
            "analysis": {
                "normalizer": {
                    "lower_normalizer": {
                        "type": "custom",
                        "char_filter": [
                            "html_strip"
                        ],
                        "filter": [
                            "cjk_width",
                            "asciifolding",
                            "lowercase"
                        ]
                    }
                }
            }
        }
    }
}

```

Thanks

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [December 26, 2023, 12:45pm UTC](https://discuss.elastic.co/t/can-not-create-a-custom-normalizer-using-char-filter-html-strip/349939/2 "2023-12-26T12:45:20Z")

</div>

Hi @voaix

I believe it is some limitation of use but if you want to use normalizer to obtain just one token you could use a keyword analyzer.

Ex:

```auto
GET /_analyze
{
   "tokenizer": "keyword",
   "filter": [
     "cjk_width",
     "asciifolding",
     "lower case"
   ],
   "char_filter": [
     "html_strip"
   ],
   "text": "this is a <b>test</b>"
}

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 23, 2024, 12:46pm UTC](https://discuss.elastic.co/t/can-not-create-a-custom-normalizer-using-char-filter-html-strip/349939/3 "2024-01-23T12:46:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
