Skip to content

Instantly share code, notes, and snippets.

@mikekr1
Created April 28, 2017 10:38
Show Gist options
  • Save mikekr1/7fad4ea9073fb5ede2f4d900f82e07a1 to your computer and use it in GitHub Desktop.
Save mikekr1/7fad4ea9073fb5ede2f4d900f82e07a1 to your computer and use it in GitHub Desktop.
module Integrations
module EsSpecHelper
def self.create_index(name:, mapping:)
ESClient.indices.create(index: name, body: mapping)
end
def self.remove_index(name:)
ESClient.indices.delete index: name
end
def self.flush_index(name:)
ESClient.indices.flush index: name
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment