# Is there a way to block new types of entities in my index

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-block-new-types-of-entities-in-my-index/31341>\
**Category:** Elasticsearch\
**Created:** [September 29, 2015, 2:25pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-block-new-types-of-entities-in-my-index/31341 "2015-09-29T14:25:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stam585](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@stam585](https://discuss.elastic.co/u/stam585)\
**Post date:** [September 29, 2015, 2:25pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-block-new-types-of-entities-in-my-index/31341/1 "2015-09-29T14:25:01Z")

</div>

I have defined

```
dynamic	"false"

```

in my _default_ mapping.  
This restricts new fields from being created.  
Is there a way to restrict new document types (entity type) to be created?  
Thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 30, 2015, 8:49am UTC](https://discuss.elastic.co/t/is-there-a-way-to-block-new-types-of-entities-in-my-index/31341/2 "2015-09-30T08:49:16Z")

</div>

The only way would be to define the type in the mapping and then use strict mapping to reject anything else.

---

<div class="post-metadata">

**Author:** ![stam585](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@stam585](https://discuss.elastic.co/u/stam585)\
**Post date:** [October 8, 2015, 6:28am UTC](https://discuss.elastic.co/t/is-there-a-way-to-block-new-types-of-entities-in-my-index/31341/3 "2015-10-08T06:28:23Z")

</div>

But what if I have a _default_ with a field (let's say ID) and dynamic="false"  
Then the new non dynamic entity will be created with ID.  
-\> And then it will be loaded to the ES.

(I have tested it and this is how it behaves)

---

<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:** [July 5, 2017, 11:45pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-block-new-types-of-entities-in-my-index/31341/4 "2017-07-05T23:45:57Z")

</div>


