lib/rsolr-ext/response.rb in mwmitchell-rsolr-ext-0.7.4 vs lib/rsolr-ext/response.rb in mwmitchell-rsolr-ext-0.7.5
- old
+ new
@@ -1,10 +1,9 @@
module RSolr::Ext::Response
autoload :Facets, 'rsolr-ext/response/facets'
autoload :Docs, 'rsolr-ext/response/docs'
- autoload :Spelling, 'rsolr-ext/response/spelling'
class Base < Mash
def header
self['responseHeader']
@@ -23,21 +22,15 @@
#
class Standard < Base
def initialize(*args)
super(*args)
- extend Docs
- extend Facets
- extend Spelling
+ extend Docs if self['response']['docs']
+ extend Facets if key?('facet_counts')
end
def response
- self[:response]
- end
-
- # short cut to response['numFound']
- def total
- response[:numFound]
+ self['response']
end
end
class Dismax < Standard
\ No newline at end of file