lib/ddr/index/response.rb in ddr-models-2.11.0 vs lib/ddr/index/response.rb in ddr-models-3.0.0.alpha.1

- old
+ new

@@ -1,30 +1,13 @@ -require "delegate" - module Ddr::Index - # - # Wraps an index query response - # class Response < SimpleDelegator def docs - response["docs"] + self["response"]["docs"] end def num_found - response["numFound"].to_i - end - - def facet_counts - self["facet_counts"] || {} - end - - def facet_fields - facet_counts["facet_fields"] || {} - end - - def response - self["response"] + self["response"]["numFound"].to_i end end end