def msearch(body=[])
      raise ArgumentError, "msearch takes an array!" unless body.is_a?(Array)
      fmt_body = body.map {|l| MultiJson.dump(l) }.join("\n") << "\n"

      res = request(:get, path_uri("/_msearch"), {}, fmt_body, {}, :mashify => false)

      errors = res['responses'].map { |response| response['error'] }.compact
      if !errors.empty?
        raise RequestError.new(res), "Could not msearch #{errors.inspect}"
      end

      res['responses'].map {|r| SearchResults.new(r)}
    end
def msearch(body=[])
      raise ArgumentError, "msearch takes an array!" unless body.is_a?(Array)
      fmt_body = body.map {|l| MultiJson.dump(l) }.join("\n") << "\n"

      res = request(:get, path_uri("/_msearch"), {}, fmt_body, {}, :mashify => false)

      errors = res['responses'].map { |response| response['error'] }.compact
      if !errors.empty?
        raise RequestError.new(res), "Could not msearch #{errors.inspect}"
      end

      res['responses'].map {|r| SearchResults.new(r)}
    end
Takes an array of msearch data as per
 http://www.elasticsearch.org/guide/reference/api/multi-search.html
 Should look something like:
    data = [
      {"index" : "test"}
      {"query" : {"match_all" : {}}, "from" : 0, "size" : 10}
      {"index" : "test", "search_type" : "count"}
      {"query" : {"match_all" : {}}}
    ]
    server.msearch(data)