# Why disabling \_field\_names doesn't reduce index size?

**URL:** <https://discuss.elastic.co/t/why-disabling--field-names-doesnt-reduce-index-size/79030>\
**Category:** Elasticsearch\
**Created:** [March 17, 2017, 1:19pm UTC](https://discuss.elastic.co/t/why-disabling--field-names-doesnt-reduce-index-size/79030 "2017-03-17T13:19:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kazama](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@Kazama](https://discuss.elastic.co/u/Kazama)\
**Post date:** [March 17, 2017, 1:19pm UTC](https://discuss.elastic.co/t/why-disabling--field-names-doesnt-reduce-index-size/79030/1 "2017-03-17T13:19:31Z")

</div>

I'm trying to strip down my index. I don't gonna use `exists` queries so I don't need the stuff behind the `_field_names` field. I've rebuilt my index from scratch with `_field_names: {enabled: false}` in the mapping.

The only difference I see is `term` queries by the `_field_names` field return nothing now. But the index size is pretty the same.

I guess disabling the field only disables the ability to directly query for the field but it is still set and indexed behind the scenes. Am I right?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [March 17, 2017, 2:14pm UTC](https://discuss.elastic.co/t/why-disabling--field-names-doesnt-reduce-index-size/79030/2 "2017-03-17T14:14:12Z")

</div>

> [@Kazama](#):
>
> I guess disabling the field only disables the ability to directly query for the field but it is still set and indexed behind the scenes. Am I right?

I had a look at the code and it doesn't look like we index the field names when you disable that. I wouldn't have spotted any bugs in my quick look though. I imagine that storying the field names isn't particularly expensive. I expect the difference is lost in the wash around the asynchronous indexing and merging behavior.

---

<div class="post-metadata">

**Author:** ![Kazama](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@Kazama](https://discuss.elastic.co/u/Kazama)\
**Post date:** [March 17, 2017, 4:06pm UTC](https://discuss.elastic.co/t/why-disabling--field-names-doesnt-reduce-index-size/79030/3 "2017-03-17T16:06:21Z")

</div>

I forgot to mention I'm on elastic 2.4.4. Mby it matters.

---

<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:** [April 14, 2017, 4:06pm UTC](https://discuss.elastic.co/t/why-disabling--field-names-doesnt-reduce-index-size/79030/4 "2017-04-14T16:06:39Z")

</div>

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