Sha256: e0919ebbc7233f5b918411e21f80facaae575ebd047d2aaca243ab33b7293d49

Contents?: true

Size: 1.31 KB

Versions: 4

Compression:

Stored size: 1.31 KB

Contents

require "cgi"
require "multi_json"

require "elasticsearch/api/version"
require "elasticsearch/api/namespace/common"
require "elasticsearch/api/utils"

Dir[ File.expand_path('../api/actions/**/*.rb', __FILE__) ].each   { |f| require f }
Dir[ File.expand_path('../api/namespace/**/*.rb', __FILE__) ].each { |f| require f }

module Elasticsearch
  module API
    COMMON_PARAMS = [
      :ignore,                        # Client specific parameters
      :index, :type, :id,             # :index/:type/:id
      :body,                          # Request body
      :node_id,                       # Cluster
      :name,                          # Alias, template, settings, warmer, ...
      :field                          # Get field mapping
    ]

    COMMON_QUERY_PARAMS = [
      :format,                        # Search, Cat, ...
      :pretty                         # Pretty-print the response
    ]

    # Auto-include all namespaces in the receiver
    #
    def self.included(base)
      base.send :include,
                Elasticsearch::API::Common,
                Elasticsearch::API::Actions,
                Elasticsearch::API::Cluster,
                Elasticsearch::API::Nodes,
                Elasticsearch::API::Indices,
                Elasticsearch::API::Snapshot,
                Elasticsearch::API::Cat
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
elasticsearch-api-1.0.1 lib/elasticsearch/api.rb
elasticsearch-api-1.0.0 lib/elasticsearch/api.rb
elasticsearch-api-1.0.0.rc2 lib/elasticsearch/api.rb
elasticsearch-api-1.0.0.rc1 lib/elasticsearch/api.rb