def post_bulk_collection(collection, options={})
      raise ArgumentError, "Array expected as :collection, got #{collection.inspect}" \
            unless collection.is_a?(Array)
      bulk_string = ''
      collection.each do |d|
        bulk_string << build_bulk_string(d, options)
      end
      post_bulk_string(:bulk_string => bulk_string) unless bulk_string.empty?
    end
def post_bulk_collection(collection, options={})
      raise ArgumentError, "Array expected as :collection, got #{collection.inspect}" \
            unless collection.is_a?(Array)
      bulk_string = ''
      collection.each do |d|
        bulk_string << build_bulk_string(d, options)
      end
      post_bulk_string(:bulk_string => bulk_string) unless bulk_string.empty?
    end
You should use Elastics.post_bulk_string if you have an already formatted bulk data-string