# Index not\_analyzed configuration not being applied

**URL:** https://discuss.elastic.co/t/index-not-analyzed-configuration-not-being-applied/37352
**Category:** Elasticsearch
**Created:** [December 16, 2015, 12:12pm UTC](https://discuss.elastic.co/t/index-not-analyzed-configuration-not-being-applied/37352 "2015-12-16T12:12:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![willyaranda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willyaranda/32/5195_2.png) [@willyaranda](https://discuss.elastic.co/u/willyaranda)
#### Post date: [December 16, 2015, 12:12pm UTC](https://discuss.elastic.co/t/index-not-analyzed-configuration-not-being-applied/37352/1 "2015-12-16T12:12:55Z")

</div>

Hi there!

We are in the process of switching from 1.7 to 2.1.

As we have a few things to change in our indexes, we decided to update the mapping, and we are seeing strange things.

We have some fields that should not be analyzed, so we have set up a template that is being applied to our new index, with this:

```auto
"mappings": {
    "fb_post": {
      "properties": {
        "tags": {
          "type": "string",
          "index": "not_analyzed"
        },

```

If we test if this is working, it is not:

`POST /facebook_messages_test/_analyze?field=fb_post.tags`

with the body

`abcd. era-76`

we are getting this response:

```auto
{
  "tokens": [
    {
      "token": "abcd",
      "start_offset": 0,
      "end_offset": 4,
      "type": "<ALPHANUM>",
      "position": 0
    },
    {
      "token": "era",
      "start_offset": 6,
      "end_offset": 9,
      "type": "<ALPHANUM>",
      "position": 1
    },
    {
      "token": "76",
      "start_offset": 10,
      "end_offset": 12,
      "type": "<NUM>",
      "position": 2
    }
  ]
}

```

And not the full element.

We have the same problem with a custom analyzer that does a `keyword` and then a `lowercase` filter. But I think this is more important.

Do you know what might be happening?

PS: the mappings are correct as we see our indexed using the template, with the correct `index`: `not_analyze` field

Thanks in advance!

---

<div class="post-metadata">

### Author: ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)
#### Post date: [December 16, 2015, 12:23pm UTC](https://discuss.elastic.co/t/index-not-analyzed-configuration-not-being-applied/37352/2 "2015-12-16T12:23:05Z")

</div>

Try removing the type prefix from the `field` query parameter to the `_analyze` API call. So instead of `fb_post.tags`, try using just `tags`.

---

<div class="post-metadata">

### Author: ![willyaranda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willyaranda/32/5195_2.png) [@willyaranda](https://discuss.elastic.co/u/willyaranda)
#### Post date: [December 16, 2015, 12:30pm UTC](https://discuss.elastic.co/t/index-not-analyzed-configuration-not-being-applied/37352/3 "2015-12-16T12:30:22Z")

</div>

Hi,

thanks for the super quick answer.

That works. I was using the `kopf` plugin, and that's the call that it is doing to the backend. Making a request by hand with the field as just the name of the field, it works.

I will open an issue to their plugin, as I got this confussion from them.

Thanks!

**Edit** : This is the issue on kopf repo [https://github.com/lmenezes/elasticsearch-kopf/issues/332](https://github.com/lmenezes/elasticsearch-kopf/issues/332)

---

<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: [July 5, 2017, 11:30pm UTC](https://discuss.elastic.co/t/index-not-analyzed-configuration-not-being-applied/37352/4 "2017-07-05T23:30:33Z")

</div>


