class Elasticsearch::DSL::Search::Suggest

Wraps the `suggest` part of a search definition

@see www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html

Public Class Methods

new(key, options={}, &block) click to toggle source
# File lib/elasticsearch/dsl/search/suggest.rb, line 29
def initialize(key, options={}, &block)
  @key     = key
  @options = options
  @block   = block
end

Public Instance Methods

to_hash() click to toggle source

Convert the definition to a Hash

@return [Hash]

# File lib/elasticsearch/dsl/search/suggest.rb, line 39
def to_hash
  { @key => @options }
end