# Field with \`enabled: false\` in nested

**URL:** <https://discuss.elastic.co/t/field-with-enabled-false-in-nested/221520>\
**Category:** Elasticsearch\
**Created:** [February 29, 2020, 12:38pm UTC](https://discuss.elastic.co/t/field-with-enabled-false-in-nested/221520 "2020-02-29T12:38:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iva3682](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iva3682/32/67504_2.png) [@iva3682](https://discuss.elastic.co/u/iva3682)\
**Post date:** [February 29, 2020, 12:38pm UTC](https://discuss.elastic.co/t/field-with-enabled-false-in-nested/221520/1 "2020-02-29T12:38:57Z")

</div>

Good afternoon! Such a question: if you set the

> enabled: false

flag to the field located in the` nested` object, when updating with painless, will the whole document be reindexed?

There is a scheme:

> ```
> 'mappings' => [
> 'properties' => [
> 'FullCategoryName' => [
> 'type' => 'text',
> 'fields' => [
> 'Token' => [
> 'type' => 'text',
> 'analyzer' => 'FullCategoryNameAnalyzer'
> ]
> ]
> ],
> 'CategoryName' => [
> 'type' => 'text',
> 'fields' => [
> 'Token' => [
> 'type' => 'text',
> 'analyzer' => 'CategoryNameAnalyzer'
> ]
> ]
> ],
> 'Link' => [
> 'type' => 'keyword',
> 'index' => false
> ],
> 'DomenID' => [
> 'type' => 'long'
> ],
> 'ContainerID' => [
> 'type' => 'long',
> 'index' => false
> ],
> 'Dates' => [
> 'type' => 'nested',
> 'properties' => [
> 'Date' => [
> 'type' => 'date',
> 'format' => 'yyyy-MM-dd'
> ],
> 'Cities' => [
> 'type' => 'nested',
> 'properties' => [
> 'CityID' => [
> 'type' => 'long'
> ],
> 'RequestHash' => [
> 'enabled' => false
> ],
> 'Statuses' => [
> 'type' => 'nested',
> 'properties' => [
> 'StatusID' => [
> 'type' => 'long'
> ],
> 'PriceCount' => [
> 'enabled' => false
> ]
> ]
> ]
> ]
> ]
> ]
> ]
> ]
> ]
> 
> ```

With frequent updating of the RequestHash and PriceCount fields (about 10,000 documents per minute), is this scheme optimal or can some mechanisms be used to work more optimally? Thanks!

---

<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:** [March 28, 2020, 12:43pm UTC](https://discuss.elastic.co/t/field-with-enabled-false-in-nested/221520/2 "2020-03-28T12:43:49Z")

</div>

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