elasticsearch/elasticsearch — pull request #8395 by alexksikes (2014-11-07 18:10:46+00:00)
Title: Term Vectors: Support for shard level caching

This commits adds caching support to the Term Vectors API. A new `_cache` body
parameter is introduced in the term vector request. When set to `true`, the
shard query cache is solicited so to keep the same near real-time promise as
uncached requests. This caching mechanism makes sense in a MLT scenario in
which the same term vector request is performed multiple times, once per
shard, or when the request is especially expensive, for example when asking
for term statistics or distributed frequencies.

In order to keep the real-time promise of the term vectors API, caching is to
`false` by default. Additionally term vector requests are now timed.