elasticsearch/elasticsearch — pull request #3485 by brwe (2013-08-12 13:33:32+00:00)
Title: Change response format of term vector endpoint

This commit changes the response format of the term vectors
to be consistent with the response format of the analyze endpoint.

```
{
"_index": "test",
"_type": "type1",
"_id": "1",
"_version": 1,
"exists": true,
"term_vectors": {
"field_with_positions_offsets": {
"field_statistics": {..},
"terms": {
"evil": {
"term_freq": 2,
"pos": [ 4 , 7 ],
"start": [ 17, 40 ],
"end": [ 21 , 44 ]
},
"orthodontist": {
"term_freq": 1,
"pos": [ 5 ]
],
"start": [ 22 ],
"end": [ 34]
}
}
}
}
}
```

becomes

```
{
"_index": "test",
"_type": "type1",
"_id": "1",
"_version": 1,
"exists": true,
"term_vectors": {
"field_with_positions_offsets": {
"field_statistics": {..},
"terms": {
"evil": {
"term_freq": 2,
"tokens": [
{ "position": 4, "start_offset": 17, "end_offset" : 21 },
{ "position": 7, "start_offset": 40, "end_offset" : 44 }
]
},
"orthodontist": {
"term_freq": 1,
"tokens" : [ { "position": 5 , "start_offset" : 22, "end_offset" : 34 } ]
}
}
}
}
}
```

Closes issue #3484