Patch ESInputFormat to only use primary shards.