lib/ej/commands.rb in ej-0.0.7 vs lib/ej/commands.rb in ej-0.0.8

- old
+ new

@@ -71,9 +71,16 @@ option :size, type: :numeric, aliases: '-n', default: 10, desc: 'size' def facet(term) puts_json(@core.facet(term, options['size'], options['query'])) end + desc 'aggs', 'aggs' + option :query, type: :string, aliases: '-q', default: '*', desc: 'query' + option :size, type: :numeric, aliases: '-n', default: 10, desc: 'size' + def aggs(term) + puts_json(@core.aggs(term, options['size'], options['query'])) + end + desc 'min', 'term' option :term, type: :string, aliases: '-k', desc: 'terms' def min puts_json(@core.min(options['term'])) end