Class: Ddr::Index::Response

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/ddr/index/response.rb

Overview

Wraps an index query response

Instance Method Summary collapse

Instance Method Details

#docsObject



9
10
11
# File 'lib/ddr/index/response.rb', line 9

def docs
  response["docs"]
end

#facet_countsObject



17
18
19
# File 'lib/ddr/index/response.rb', line 17

def facet_counts
  self["facet_counts"] || {}
end

#facet_fieldsObject



21
22
23
# File 'lib/ddr/index/response.rb', line 21

def facet_fields
  facet_counts["facet_fields"] || {}
end

#num_foundObject



13
14
15
# File 'lib/ddr/index/response.rb', line 13

def num_found
  response["numFound"].to_i
end

#responseObject



25
26
27
# File 'lib/ddr/index/response.rb', line 25

def response
  self["response"]
end