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' -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}}}}
}