elasticsearch/elasticsearch — pull request #7855 by javanna (2014-09-24 11:45:49+00:00)
Title: Internal: clarify when a shard search request gets created to be only used locally

In some cases a shard search request gets created on a node to be only used there and never sent over the transport. This commit introduces two static "factory" methods and makes the existing local constructor private so that it's clearer when a shard search request will be only used locally. As a side note if a shard level request doesn't get sent over the transport nor executed via transport action, it doesn't need to hold the original request headers.

Took the chance to remove an unused `InternalScrollSearchRequest` constructor and an empty else branch in `TransportSearchScrollQueryAndFetchAction`.