# Template wildcard data type, normalizer/analyzer for case insensitive search

**URL:** <https://discuss.elastic.co/t/template-wildcard-data-type-normalizer-analyzer-for-case-insensitive-search/245743>\
**Category:** Elasticsearch\
**Created:** [August 20, 2020, 10:23am UTC](https://discuss.elastic.co/t/template-wildcard-data-type-normalizer-analyzer-for-case-insensitive-search/245743 "2020-08-20T10:23:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheWorkingDeveloper](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theworkingdeveloper/32/90834_2.png) [@TheWorkingDeveloper](https://discuss.elastic.co/u/TheWorkingDeveloper)\
**Post date:** [August 20, 2020, 10:23am UTC](https://discuss.elastic.co/t/template-wildcard-data-type-normalizer-analyzer-for-case-insensitive-search/245743/1 "2020-08-20T10:23:58Z")

</div>

I have a data ingest that contains user input and want to wildcard search it. But I need the search to be case insensitive.

```auto
"normalizer": {
    "lowercase_normalizer": {
      "type": "custom",
      "char_filter": [],
      "filter": ["lowercase"]
    }
}

```

So I used to have this normalizer in place on a "keyword" field but that is really slow compared to the new 'wildcard' data type (allegedly).

```auto
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "normalizer": "lowercase_normalizer"
          },
          "wildcard": {
            "type": "wildcard",
            "normalizer": "lowercase_normalizer"
          }
        }

```

The above however returns an error because normalizers aren't allowed in wildcard data types.  
Any suggestions for how to lowercase, wildcard search using the wildcard datatype?

---

<div class="post-metadata">

**Author:** ![TheWorkingDeveloper](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theworkingdeveloper/32/90834_2.png) [@TheWorkingDeveloper](https://discuss.elastic.co/u/TheWorkingDeveloper)\
**Post date:** [August 20, 2020, 10:36am UTC](https://discuss.elastic.co/t/template-wildcard-data-type-normalizer-analyzer-for-case-insensitive-search/245743/2 "2020-08-20T10:36:07Z")

</div>

Question answered here:

> [@Wildcard datatype lowercase](https://discuss.elastic.co/t/wildcard-datatype-lowercase/245726):
>
> I am looking at the [Wildcard datatype introduced in 7.9](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/wildcard.html). I would like to normalize it first by lowercasing and removing whitespace. I can't work out the syntax. "normalizer" and "analyzer" don't seem to be supported.

---

<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:** [September 17, 2020, 10:36am UTC](https://discuss.elastic.co/t/template-wildcard-data-type-normalizer-analyzer-for-case-insensitive-search/245743/3 "2020-09-17T10:36:10Z")

</div>

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