# Tune for disk usage - phrase queries

**URL:** <https://discuss.elastic.co/t/tune-for-disk-usage-phrase-queries/165231>\
**Category:** Elasticsearch\
**Created:** [January 22, 2019, 12:50pm UTC](https://discuss.elastic.co/t/tune-for-disk-usage-phrase-queries/165231 "2019-01-22T12:50:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [January 22, 2019, 12:50pm UTC](https://discuss.elastic.co/t/tune-for-disk-usage-phrase-queries/165231/1 "2019-01-22T12:50:15Z")

</div>

Hi!

In the guide for [tuning for disk usage](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/tune-for-disk-usage.html#_disable_the_features_you_do_not_need), it states:

> text fields also store frequencies and positions in the index by default. Frequencies are used to compute scores and positions are used to run phrase queries. If you do not need to run phrase queries, you can tell Elasticsearch to not index positions

By adding `"index_options": "freqs"` to the fields's settings. The [relevant guide for this option](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-options.html#index-options), has a more "simple" setting: `docs`. If I don't care about frequencies either, will a save more space by adding `"index_options": "docs"`?

It isn't clear which queries are affected when I change the index option. Only those which has `match_phrase` filter? Every query? Do I get an error messages when executing a query on a field where the option is changed?

Thank you!

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [January 25, 2019, 11:36am UTC](https://discuss.elastic.co/t/tune-for-disk-usage-phrase-queries/165231/3 "2019-01-25T11:36:44Z")

</div>

It seems that it's quite hard to get an answer for ES internals. @ruflin do you know any place I can look up to be able to decide if I should change the index option above? While I'd be able to test how much disk space I saved, I can't say which queries/aggregations will be affected and that's concerning me.

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [January 30, 2019, 11:14am UTC](https://discuss.elastic.co/t/tune-for-disk-usage-phrase-queries/165231/4 "2019-01-30T11:14:44Z")

</div>

No takers?

---

<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:** [February 27, 2019, 11:25am UTC](https://discuss.elastic.co/t/tune-for-disk-usage-phrase-queries/165231/5 "2019-02-27T11:25:18Z")

</div>

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