Class: Sunspot::Search::Spellcheck::Collation
- Inherits:
-
Object
- Object
- Sunspot::Search::Spellcheck::Collation
- Defined in:
- lib/sunspot_suggest/sunspot/search/abstract_search.rb
Overview
TODO: Firm up the names of these a bit
Instance Attribute Summary collapse
-
#hits ⇒ Object
readonly
Returns the value of attribute hits.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#suggestions ⇒ Object
readonly
Returns the value of attribute suggestions.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Collation
constructor
A new instance of Collation.
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
#hits ⇒ Object (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 |
#query ⇒ Object (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 |
#suggestions ⇒ Object (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 |