Class: Sunspot::Search::Spellcheck::Collation

Inherits:
Object
  • Object
show all
Defined in:
lib/sunspot_suggest/sunspot/search/abstract_search.rb

Overview

TODO: Firm up the names of these a bit

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Collation

Returns a new instance of Collation.



11
12
13
14
15
# File 'lib/sunspot_suggest/sunspot/search/abstract_search.rb', line 11

def initialize(args = {})
  @query = args['collationQuery']
  @hits = args['hits']
  @suggestions = parse_corrections(args['misspellingsAndCorrections'])
end

Instance Attribute Details

#hitsObject (readonly)

Returns the value of attribute hits.



9
10
11
# File 'lib/sunspot_suggest/sunspot/search/abstract_search.rb', line 9

def hits
  @hits
end

#queryObject (readonly)

Returns the value of attribute query.



9
10
11
# File 'lib/sunspot_suggest/sunspot/search/abstract_search.rb', line 9

def query
  @query
end

#suggestionsObject (readonly)

Returns the value of attribute suggestions.



9
10
11
# File 'lib/sunspot_suggest/sunspot/search/abstract_search.rb', line 9

def suggestions
  @suggestions
end