class Sunspot::Query::Suggest

Attributes

options[RW]

Public Class Methods

new(opts = {}) click to toggle source
# File lib/sunspot_suggest/sunspot/query/suggest.rb, line 7
def initialize(opts = {})
  @options = opts
end

Public Instance Methods

to_params() click to toggle source
# File lib/sunspot_suggest/sunspot/query/suggest.rb, line 11
def to_params
  opts = {}
  @options.each do |key, val|
    opts['spellcheck.' + Sunspot::Util.method_case(key)] = val
  end

  {
    :spellcheck => true,
    :rows => 0,
    'spellcheck.count' => 10,
  }.merge(opts)
end