spec/spec_helper.rb in elasticsearch-model-7.0.0 vs spec/spec_helper.rb in elasticsearch-model-7.1.0.pre

- old
+ new

@@ -79,11 +79,19 @@ # @return [ true ] # # @since 6.0.1 def clear_indices(*models) models.each do |model| - begin; Elasticsearch::Model.client.delete_by_query(index: model.index_name, q: '*'); rescue; end - end and true + begin + Elasticsearch::Model.client.delete_by_query( + index: model.index_name, + q: '*', + body: {} + ) + rescue + end + end + true end # Delete all documents from the tables of the provided list of models. # # @param [ Array<ActiveRecord::Base> ] models The list of models.