Skip to content
This repository was archived by the owner on Jun 30, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/tire/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,15 @@ def import_model(index, klass, params)

end

namespace :indices do
desc 'List existing indices'
task :list do
status_url = "#{Tire::Configuration.url}/_status"
status_response = Tire::HTTP::Client::RestClient.get(status_url)
status_data = MultiJson.decode(status_response.body)

puts status_data['indices'].keys
end
end

end