# Is it possible to mask field name in mappings?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-mask-field-name-in-mappings/290193>\
**Category:** Elasticsearch\
**Created:** [November 25, 2021, 3:06pm UTC](https://discuss.elastic.co/t/is-it-possible-to-mask-field-name-in-mappings/290193 "2021-11-25T15:06:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddoroshenko](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@ddoroshenko](https://discuss.elastic.co/u/ddoroshenko)\
**Post date:** [November 25, 2021, 3:06pm UTC](https://discuss.elastic.co/t/is-it-possible-to-mask-field-name-in-mappings/290193/1 "2021-11-25T15:06:26Z")

</div>

Hello!

I'd like to set all fields type as `keyword` except some custom fields.

```auto
"properties": {
  "field1": { "type" : "text" },
  "*": { "type" : "keyword" }
}

```

doesn't work ant the fields mapping dynamically.

Is there any way to solve the task?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 25, 2021, 3:21pm UTC](https://discuss.elastic.co/t/is-it-possible-to-mask-field-name-in-mappings/290193/2 "2021-11-25T15:21:58Z")

</div>

Have a look at [Dynamic templates | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-templates.html)

---

<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:** [December 23, 2021, 3:22pm UTC](https://discuss.elastic.co/t/is-it-possible-to-mask-field-name-in-mappings/290193/3 "2021-12-23T15:22:17Z")

</div>

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