Class: Solr::Query::Response::Spellcheck::Collation
- Inherits:
-
Object
- Object
- Solr::Query::Response::Spellcheck::Collation
- Defined in:
- lib/solr/query/response/spellcheck.rb
Instance Method Summary collapse
- #collation_query ⇒ Object
- #hits ⇒ Object
-
#initialize(data) ⇒ Collation
constructor
A new instance of Collation.
- #misspellings_and_corrections ⇒ Object
Constructor Details
#initialize(data) ⇒ Collation
Returns a new instance of Collation.
8 9 10 |
# File 'lib/solr/query/response/spellcheck.rb', line 8 def initialize(data) @data = data end |
Instance Method Details
#collation_query ⇒ Object
12 13 14 |
# File 'lib/solr/query/response/spellcheck.rb', line 12 def collation_query @data['collationQuery'] end |
#hits ⇒ Object
16 17 18 |
# File 'lib/solr/query/response/spellcheck.rb', line 16 def hits @data['hits'] end |
#misspellings_and_corrections ⇒ Object
20 21 22 23 |
# File 'lib/solr/query/response/spellcheck.rb', line 20 def misspellings_and_corrections return {} unless @data['misspellingsAndCorrections'] @data['misspellingsAndCorrections'].in_groups_of(2).to_h end |