Sha256: e32e951f6c6d383402e3cd2b2e94b7c2f0d010120f107991438c39da4992ca00

Contents?: true

Size: 684 Bytes

Versions: 6

Compression:

Stored size: 684 Bytes

Contents

# Engines are the core concept representing indexes in App Search.
#
module Elastic
  module AppSearch
    class Client
      module Engines
        def list_engines(current: 1, size: 20)
          get("engines", :page => { :current => current, :size => size })
        end

        def get_engine(engine_name)
          get("engines/#{engine_name}")
        end

        def create_engine(engine_name, language = nil)
          params = { :name => engine_name }
          params[:language] = language if language
          post("engines", params)
        end

        def destroy_engine(engine_name)
          delete("engines/#{engine_name}")
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
elastic-app-search-7.4.0 lib/elastic/app-search/client/engines.rb
elastic-app-search-7.3.2 lib/elastic/app-search/client/engines.rb
elastic-app-search-7.3.1 lib/elastic/app-search/client/engines.rb
elastic-app-search-7.3.0 lib/elastic/app-search/client/engines.rb
elastic-app-search-7.2.0 lib/elastic/app-search/client/engines.rb
elastic-app-search-0.7.0 lib/elastic/app-search/client/engines.rb