# Is it possible to change the default value of max\_expansions?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-change-the-default-value-of-max-expansions/123536>\
**Category:** Elasticsearch\
**Created:** [March 12, 2018, 11:21am UTC](https://discuss.elastic.co/t/is-it-possible-to-change-the-default-value-of-max-expansions/123536 "2018-03-12T11:21:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [March 12, 2018, 11:21am UTC](https://discuss.elastic.co/t/is-it-possible-to-change-the-default-value-of-max-expansions/123536/1 "2018-03-12T11:21:37Z")

</div>

Match Phrase Prefix queries has an optional parameter **max\_expansions** which controls how many suffixes the last term will be expanded to. The problem is that the default value of 50 is not high enough for us to match all the terms we need to, and we would like to change this default value to avoid having to set it for each prefix-query.

Is there an option in the Elasitcsearch configuration or the index mapping we can set to override the default value of max\_expansions?

---

<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 9, 2018, 11:21am UTC](https://discuss.elastic.co/t/is-it-possible-to-change-the-default-value-of-max-expansions/123536/2 "2018-04-09T11:21:42Z")

</div>

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