Sha256: f4d08c3daa54283f08bd074203fc4382f602bf93ba6268d1d580bb2ca11f61a4

Contents?: true

Size: 927 Bytes

Versions: 1

Compression:

Stored size: 927 Bytes

Contents

# encoding: UTF-8

module Esearch
  # Handler for set of indices
  class Indices
    include Adamantium::Flat, Concord.new(:connection, :names)
    include Mixin::Exist, Mixin::Index, Mixin::Search

    # Return connection
    #
    # @return [Connection]
    #
    # @api private
    #
    attr_reader :connection

    # Return path
    #
    # @return [Pathname]
    #
    # @api private
    #
    def path
      Pathname.new("/#{names.join(',')}")
    end
    memoize :path

    # Control all indices of a cluster
    class All < self
      include Concord.new(:connection)

      PATH = Pathname.new('/_all').freeze

      # Return connection
      #
      # @return [Connection]
      #
      # @api private
      #
      attr_reader :connection

      # Return path
      #
      # @return [Pathname]
      #
      # @api private
      #
      def path
        PATH
      end

    end # All
  end # Indices
end # Esearch

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
esearch-0.2.2 lib/esearch/indices.rb