# Analyzer defined in index settings doesn't apply to fields

**URL:** <https://discuss.elastic.co/t/analyzer-defined-in-index-settings-doesnt-apply-to-fields/112087>\
**Category:** Elasticsearch\
**Created:** [December 16, 2017, 1:46pm UTC](https://discuss.elastic.co/t/analyzer-defined-in-index-settings-doesnt-apply-to-fields/112087 "2017-12-16T13:46:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![navid.f10](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@navid.f10](https://discuss.elastic.co/u/navid.f10)\
**Post date:** [December 16, 2017, 1:46pm UTC](https://discuss.elastic.co/t/analyzer-defined-in-index-settings-doesnt-apply-to-fields/112087/1 "2017-12-16T13:46:45Z")

</div>

Hi,

I created a new index with the following settings:

```
{
    "settings": {

    "analysis": {

      "filter": {

        "persian_stop": {

          "type": "stop",

          "stopwords": "_persian_"

        }

      },

      "char_filter": {

        "zero_width_spaces": {

          "type": "mapping",

          "mappings": [

            "\\u200C=> "

          ]

        }

      },

      "analyzer": "persian",

      "persian": {

        "tokenizer": "standard"
		   }
	    }
    }
}

```

after inserting a document let's say of type "video".  
The analyzer setting is not applied to fields of this type thus the queries do not return the desired result.  
Do I need to define an analyzer for every type's fields or setting an analyzer in my index setting suffice?

Thank you in advance for your assistance  
N.

---

<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:** [January 13, 2018, 1:46pm UTC](https://discuss.elastic.co/t/analyzer-defined-in-index-settings-doesnt-apply-to-fields/112087/2 "2018-01-13T13:46:49Z")

</div>

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