# Term Vector Setting in Mapping

**URL:** https://discuss.elastic.co/t/term-vector-setting-in-mapping/1646
**Category:** Elasticsearch
**Created:** [June 1, 2015, 2:04pm UTC](https://discuss.elastic.co/t/term-vector-setting-in-mapping/1646 "2015-06-01T14:04:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jaraxal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaraxal/32/458_2.png) [@Jaraxal](https://discuss.elastic.co/u/Jaraxal)
#### Post date: [June 1, 2015, 2:04pm UTC](https://discuss.elastic.co/t/term-vector-setting-in-mapping/1646/1 "2015-06-01T14:04:25Z")

</div>

I'm trying to setup an index template to turn on term vectors for a specific field in the mapping. Unfortunately, the documenation isn't very specific about how I add the setting.

Here is the link: [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html)

The example provided is:

{  
"type\_name" : {  
"content" : {"term\_vector" : "with\_positions\_offsets"}  
}  
}

Where is this supposed to be placed in the mapping? This seems to be a consistent problem with the documentation. There are tons of "snippets" that get dropped in some place. However there is often no good "full" example that shows exactly where those snippets get dropped or how they work together.

---

<div class="post-metadata">

### Author: ![Jaraxal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaraxal/32/458_2.png) [@Jaraxal](https://discuss.elastic.co/u/Jaraxal)
#### Post date: [June 1, 2015, 2:11pm UTC](https://discuss.elastic.co/t/term-vector-setting-in-mapping/1646/2 "2015-06-01T14:11:49Z")

</div>

It may be bad form to anwser my own question, but I think I found the answer here: [https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-core-types.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-core-types.html)

It looks like I need to add "term\_vector" : "with\_positions\_offsets" to the field for which I want term vectors in the mapping.

---

<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 6, 2017, 12:10am UTC](https://discuss.elastic.co/t/term-vector-setting-in-mapping/1646/3 "2017-07-06T00:10:29Z")

</div>


