Class: Dbla::AbstractResponse
- Inherits:
-
HashWithIndifferentAccess
- Object
- HashWithIndifferentAccess
- Dbla::AbstractResponse
- Includes:
- Blacklight::SolrResponse::PaginationMethods
- Defined in:
- lib/dbla/abstract_response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#blacklight_config ⇒ Object
secret api.
-
#document_model ⇒ Object
secret api.
-
#documents ⇒ Object
secret api.
-
#limit ⇒ Object
(also: #rows)
secret api.
-
#request_params ⇒ Object
secret api.
-
#start ⇒ Object
secret api.
-
#total ⇒ Object
secret api.
Instance Method Summary collapse
-
#aggregations ⇒ Object
Facets are built from this method’s output.
-
#export_formats ⇒ Object
secret api.
- #grouped? ⇒ Boolean
- #header ⇒ Object
- #more_like(doc) ⇒ Object
- #params ⇒ Object
- #sort ⇒ Object
Instance Attribute Details
#blacklight_config ⇒ Object
secret api
7 8 9 |
# File 'lib/dbla/abstract_response.rb', line 7 def blacklight_config @blacklight_config end |
#document_model ⇒ Object
secret api
7 8 9 |
# File 'lib/dbla/abstract_response.rb', line 7 def document_model @document_model end |
#documents ⇒ Object
secret api
7 8 9 |
# File 'lib/dbla/abstract_response.rb', line 7 def documents @documents end |
#limit ⇒ Object Also known as: rows
secret api
7 8 9 |
# File 'lib/dbla/abstract_response.rb', line 7 def limit @limit end |
#request_params ⇒ Object
secret api
7 8 9 |
# File 'lib/dbla/abstract_response.rb', line 7 def request_params @request_params end |
#start ⇒ Object
secret api
7 8 9 |
# File 'lib/dbla/abstract_response.rb', line 7 def start @start end |
#total ⇒ Object
secret api
7 8 9 |
# File 'lib/dbla/abstract_response.rb', line 7 def total @total end |
Instance Method Details
#aggregations ⇒ Object
Facets are built from this method’s output
26 27 28 |
# File 'lib/dbla/abstract_response.rb', line 26 def aggregations {} end |
#export_formats ⇒ Object
secret api
30 31 32 |
# File 'lib/dbla/abstract_response.rb', line 30 def export_formats {} end |
#grouped? ⇒ Boolean
34 35 36 |
# File 'lib/dbla/abstract_response.rb', line 34 def grouped? false end |
#header ⇒ Object
9 10 11 |
# File 'lib/dbla/abstract_response.rb', line 9 def header self['responseHeader'] || {} end |
#more_like(doc) ⇒ Object
38 39 40 |
# File 'lib/dbla/abstract_response.rb', line 38 def more_like(doc) [] end |
#params ⇒ Object
13 14 15 |
# File 'lib/dbla/abstract_response.rb', line 13 def params header['params'] || request_params end |
#sort ⇒ Object
19 20 21 22 23 |
# File 'lib/dbla/abstract_response.rb', line 19 def sort # REVIEW: There are mixed style key accesses (strings and symbols); # Could/Should this be "normalized"? params[:sort] end |