Class: Ddr::Index::Response
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Ddr::Index::Response
- Defined in:
- lib/ddr/index/response.rb
Overview
Wraps an index query response
Instance Method Summary collapse
Instance Method Details
#docs ⇒ Object
9 10 11 |
# File 'lib/ddr/index/response.rb', line 9 def docs response["docs"] end |
#facet_counts ⇒ Object
17 18 19 |
# File 'lib/ddr/index/response.rb', line 17 def facet_counts self["facet_counts"] || {} end |
#facet_fields ⇒ Object
21 22 23 |
# File 'lib/ddr/index/response.rb', line 21 def facet_fields facet_counts["facet_fields"] || {} end |
#num_found ⇒ Object
13 14 15 |
# File 'lib/ddr/index/response.rb', line 13 def num_found response["numFound"].to_i end |
#response ⇒ Object
25 26 27 |
# File 'lib/ddr/index/response.rb', line 25 def response self["response"] end |