lib/ej/commands.rb in ej-0.1.6 vs lib/ej/commands.rb in ej-0.1.8
- old
+ new
@@ -199,12 +199,13 @@
end
desc 'delete', 'delete'
option :index, aliases: '-i', type: :string, default: nil, required: true, desc: 'index'
option :type, type: :string, aliases: '-t', default: nil, desc: 'type'
- option :query, type: :hash, aliases: '-q', default: nil, desc: 'query'
+ option :query, type: :string, aliases: '-q', default: nil, desc: 'query'
def delete
- @indices.delete(options[:index], options[:type], options[:query])
+ query = eval(options[:query])
+ @indices.delete(options[:index], options[:type], query)
end
desc 'delete_template --name [name]', 'delete_template'
option :name, type: :string, default: nil, required: true, desc: 'template name'
def delete_template