# How to cause queries to fail against an index when unmapped fields are referenced?

**URL:** <https://discuss.elastic.co/t/how-to-cause-queries-to-fail-against-an-index-when-unmapped-fields-are-referenced/234820>\
**Category:** Elasticsearch\
**Created:** [May 28, 2020, 8:53pm UTC](https://discuss.elastic.co/t/how-to-cause-queries-to-fail-against-an-index-when-unmapped-fields-are-referenced/234820 "2020-05-28T20:53:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jheath](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jheath](https://discuss.elastic.co/u/jheath)\
**Post date:** [May 28, 2020, 8:53pm UTC](https://discuss.elastic.co/t/how-to-cause-queries-to-fail-against-an-index-when-unmapped-fields-are-referenced/234820/1 "2020-05-28T20:53:56Z")

</div>

Hi folks,

Is there a method by which we can cause queries to fail against an index when unmapped fields are referenced?

I have noticed that, in the past, there was an `ignore_unmapped` option that worked, however support for this seems to have been dropped around ES version 5. Such an option would make it easy to find when fields have been misspelled or otherwise incorrectly referenced in queries. Such functionality would effectively be similar to the `strict` setting for indexing, whereby indexing on an unmapped field fails loudly.

As suggested in this issue on GitHub ([elastic/elasticsearch#12016](https://github.com/elastic/elasticsearch/issues/12016)), it seems that this functionality is no longer available or at least no longer works.

Any help or pointers on the matter would be greatly appreciated.

---

<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:** [June 25, 2020, 8:53pm UTC](https://discuss.elastic.co/t/how-to-cause-queries-to-fail-against-an-index-when-unmapped-fields-are-referenced/234820/2 "2020-06-25T20:53:57Z")

</div>

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