# Term Vectors: no return of ttf key if term not present \[v 2.3.5\]

**URL:** https://discuss.elastic.co/t/term-vectors-no-return-of-ttf-key-if-term-not-present-v-2-3-5/74683
**Category:** Elasticsearch
**Created:** [February 10, 2017, 3:48pm UTC](https://discuss.elastic.co/t/term-vectors-no-return-of-ttf-key-if-term-not-present-v-2-3-5/74683 "2017-02-10T15:48:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tilmanbeck](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@tilmanbeck](https://discuss.elastic.co/u/tilmanbeck)
#### Post date: [February 10, 2017, 3:48pm UTC](https://discuss.elastic.co/t/term-vectors-no-return-of-ttf-key-if-term-not-present-v-2-3-5/74683/1 "2017-02-10T15:48:40Z")

</div>

Iam retrieving term\_statistics for a certain term with an artifical document. I wonder, in case the term is not present on the provided field, why the key 'ttf' (total term frequency) is not returned at all instead of returning simply zero.  
This is my sample query:

curl -XGET '[http://localhost:9200/myindex/mytype/\_termvectors](http://localhost:9200/myindex/mytype/_termvectors)' -d '{ "doc" : {  
"title" : "my\_term"  
},  
"fields":["title"],  
"offsets": false,  
"positions": false,  
"term\_statistics": true,  
"field\_statistics": false  
}'

and my response:  
{"\_index":"myindex","\_type":"mytype","\_version":0,"found":true,"took":1,  
"term\_vectors":  
{"title":  
{"terms":  
{"myterm":  
{"term\_freq":1}}}}  
}

---

<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: [March 10, 2017, 3:49pm UTC](https://discuss.elastic.co/t/term-vectors-no-return-of-ttf-key-if-term-not-present-v-2-3-5/74683/2 "2017-03-10T15:49:25Z")

</div>

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