Add Class and Package Level support for TestLogging
Enable Trace Logging for org.elasticsearch.action.search.type on aggregations
remove ensureGreen for debugging
Trace log all shard failures if an exception is attached.
Allow to get a specific transport client inside of tests

Adding functionality to call cluster().transportClient() in tests in order
to get an arbitrary TransportClient object back, independently if the
transport client ratio in returning the normal clients is configured.

Also made sure, that if the normal client is already a transport client
(or a node client) we do not generate another one.
Support postings highlighter in percolate api.

The postings hl now uses a searcher that only encapsulate the view of segment the document being highlighted is in,
this should be better than using the top level engine searcher.

Closes #4385
Fix test failure.
Added ElasticsearchIntegrationTest#ensureSearchable() to prepare indices to be searchable

Currently we sometimes see test failures that fail because not all replicase are
`searchable` which means they are not started yet or still recovering. Yet, the usual
situation is where two nodes have the same clusterstate but the one that acts as
the search target has not yet processed that clusterstate. The requester sees the
shard as started but it's not mark as such on the target node. For now the #ensureSearchable()
just delegates to #ensureYellow() to make sure the cluster is not red. In the future if we have
the possibilty to recover from situations like this in the search logic we can easily test
this by making the impl a no-op. Note: this problem only occurs if you have low number of docs
and the indexing is really quick such that first request are exectued but shards are not
fully `started`
move to ensureGreen in aggs tests to stabelize tests
Do not override thetas if sum is less or equals to `0`

Closes #4390
Made sure the new cluster state is not held by AckCountDownListener

(also made AckCountDownListener class static)
Added aggs option to percolate api documentation.
Use a dedicated cluster name for GeoDistanceSearchBenchmark (like we do for other benchmarks).
Added more logging for percolator.
Lowered log level in percolator tests.
Remove 'term_index_interval' and 'term_index_divisor'

These settings are no longer relevant since they are codec /
postingsformat level settings since Lucene 4.0

Closes #3912
Fix bug in explain for function_score queries.

The explain output for function_score queries with score_mode=max or
score_mode=min was incorrect, returning instead the value of the last
function.  This change fixes this.
moved log statements
Preference only_node with unknown nodeId returns useful exception

When the search preference is set to only node, but this node is not a
data (or does not exist), we return a search exception, which indicates,
that this is actually a server problem.

However specifying a non-existing node id is a client problem
and should return a more useful error message than
{"error":"SearchPhaseExecutionException[Failed to execute phase [query_fetch], all shards failed]","status":503}
Introduce BytesTransportRequest, allowing for downstream network optimization in buffers usage
When sending a request, mainly to multiple nodes, if we already have the "body" of the request in bytes, we can share it instead of copying it over to a new buffer. Also, it helps a lot when sending a relatively large body to multiple nodes, since it will use the same body buffer across all nodes
Add wildcard support to field resolving in the Get Field Mapping API

Closes #4367