alphagov/rummager — pull request #74 by fatbusinessman (2013-03-15 16:27:24+00:00)
Title: Fix scan queries with multiple shards

As it turns out, elasticsearch is weird in two ways:

* The `size` parameter on scan queries refers to the number of hits to return per shard, not in total.
* If any of the shards have run out of results, the entire response has a 500 status code but can still contain results.

(Rebased and improved version of alphagov/rummager#73.)