# Term\_vectors and custom analyzers

**URL:** https://discuss.elastic.co/t/term-vectors-and-custom-analyzers/202188
**Category:** Elasticsearch
**Created:** [October 3, 2019, 2:22pm UTC](https://discuss.elastic.co/t/term-vectors-and-custom-analyzers/202188 "2019-10-03T14:22:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bbaronas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bbaronas/32/116240_2.png) [@bbaronas](https://discuss.elastic.co/u/bbaronas)
#### Post date: [October 3, 2019, 2:22pm UTC](https://discuss.elastic.co/t/term-vectors-and-custom-analyzers/202188/1 "2019-10-03T14:22:18Z")

</div>

Hello,

I'm running Elasticsearch 7.3.2 in Elastic Cloud. I have built a mapping for one of my indices where I have used a custom analyzer: "standard-uax-url-analyzer" that is essentially the standard analyzer, but it is more tolerant of email addresses and html.

The problem I am having is I have a field in my mapping "body" that I put the standard-uax-url-analyzer on:

```
"body": {
            "type": "text",
            "term_vector": "with_positions_offsets",
            "analyzer": "standard-uax-url-analyzer",
            "fields": {
                "english": {
                    "type": "text",
                    "term_vector": "with_positions_offsets",
                    "analyzer": "english_email"
                }
            }
        }

```

But, whenever I look at my index in Kibana with GET _my\_index_, or GET _my\_index_/\_mapping, the analyzer field does not appear:

```
"body" : {
      "type" : "text",
      "term_vector" : "with_positions_offsets",
      "fields" : {
        "english" : {
          "type" : "text",
          "term_vector" : "with_positions_offsets",
          "analyzer" : "english_email"
        }
      },

```

These code excerpts are directly from my Kibana console. The first is a subset of my PUT _my\_index_ command, the second from my GET _my\_index_/\_mapping command.

Does anyone have any idea why my analyzer field disappears? Did my "body" field revert to the standard analyzer? Is it using my correct analyzer, but not showing it? As you can see in the above code snippets, my body.english field retained its "english\_email" analyzer, and other fields where I used "standard-uax-url-analyzer" as the analyzer, it still appears as such. Any ideas?

---

<div class="post-metadata">

### Author: ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)
#### Post date: [October 11, 2019, 9:14pm UTC](https://discuss.elastic.co/t/term-vectors-and-custom-analyzers/202188/2 "2019-10-11T21:14:09Z")

</div>

Could you please try:

```auto
GET my_index/_mapping?include_defaults=true

```

This should make clear which analyzer is being used.

---

<div class="post-metadata">

### Author: ![bbaronas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bbaronas/32/116240_2.png) [@bbaronas](https://discuss.elastic.co/u/bbaronas)
#### Post date: [October 16, 2019, 6:30pm UTC](https://discuss.elastic.co/t/term-vectors-and-custom-analyzers/202188/3 "2019-10-16T18:30:34Z")

</div>

I gave that a try in Kibana. The error I got back was:  
{  
"error": {  
"root\_cause": [  
{  
"type": "illegal\_argument\_exception",  
"reason": "request [/emails/\_mapping] contains unrecognized parameter: [include\_defaults]"  
}  
],  
"type": "illegal\_argument\_exception",  
"reason": "request [/emails/\_mapping] contains unrecognized parameter: [include\_defaults]"  
},  
"status": 400  
}

That being said, the "analyzer": "standard-uax-url-analyzer" line eventually showed up in my mapping at the correct spot. I just don't understand why it didn't show up initially.

---

<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: [November 13, 2019, 6:30pm UTC](https://discuss.elastic.co/t/term-vectors-and-custom-analyzers/202188/4 "2019-11-13T18:30:36Z")

</div>

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