lib/desi/index_manager.rb
def list(pattern = '.*')
      pattern = Regexp.new(pattern || '.*')

      @outputter.puts "Indices from host #{@host} matching the pattern #{pattern.inspect}\n\n" if @verbose

      list = indices(pattern).sort
      list.each {|i| @outputter.puts i.inspect } if @verbose
      list
    end
# List index names for the specified cluster
#
# You can restrict the list using a regular expression pattern. (The default
# pattern being +/.*/+, all releases will be returned if you do not
# specify anything.)
#
# @param   [#to_s]          pattern ('.*') Regexp pattern used to restrict the selection
# @return  [Array<String>]                 List of index names of the ES cluster
#
# @note This method will also output its result on STDOUT if +@verbose+ is
#       true
#
# @example List all indices whose name begins with "foo"
#    Desi::IndexManager.new.list('^foo') #=> ["foo1", "foo2", "foo3"]
#
# @api  public
List index names for the specified cluster
You can restrict the list using a regular expression pattern. (The default
pattern being +/.*/+, all releases will be returned if you do not
specify anything.)
List index names for the specified cluster You can restrict the list using a regular expression pattern . ( The default pattern being + / . * / + all releases will be returned if you do not specify anything . )
def list(pattern = '.*')
      pattern = Regexp.new(pattern || '.*')
      @outputter.puts "Indices from host #{@host} matching the pattern #{pattern.inspect}\n\n" if @verbose
      list = indices(pattern).sort
      list.each {|i| @outputter.puts i.inspect } if @verbose
      list
    end
def list ( pattern = '.*' ) pattern = Regexp . new ( pattern || '.*' ) @outputter . puts "Indices from host #{@host} matching the pattern #{pattern.inspect}\n\n" if @verbose list = indices ( pattern ) . sort list . each { | i | @outputter . puts i . inspect } if @verbose list end
List index names for the specified cluster
You can restrict the list using a regular expression pattern.
List index names for the specified cluster You can restrict the list using a regular expression pattern .
List of index names of the ES cluster
List of index names of the ES cluster
Array<String>
pattern
pattern ('.*') Regexp pattern used to restrict the selection
pattern ( ' . * ' ) Regexp pattern used to restrict the selection
note
This method will also output its result on STDOUT if +@verbose+ is true
This method will also output its result on STDOUT if + @verbose + is true
example
List all indices whose name begins with "foo" Desi::IndexManager.new.list('^foo') #=> ["foo1", "foo2", "foo3"]
List all indices whose name begins with " foo " Desi :: IndexManager . new . list ( ' ^foo ' ) # = > [ " foo1 " " foo2 " " foo3 " ]
api
None