Module: BlacklightIiifSearch::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/blacklight_iiif_search/controller.rb
Instance Method Summary collapse
- #iiif_search ⇒ Object
- #iiif_search_config ⇒ Object
- #iiif_search_params ⇒ Object
- #iiif_suggest ⇒ Object
Instance Method Details
#iiif_search ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/concerns/blacklight_iiif_search/controller.rb', line 11 def iiif_search _parent_response, @parent_document = fetch(params[:solr_document_id]) iiif_search = IiifSearch.new(iiif_search_params, iiif_search_config, @parent_document) @response, _document_list = search_results(iiif_search.solr_params) iiif_search_response = IiifSearchResponse.new(@response, @parent_document, self) render json: iiif_search_response.annotation_list, content_type: 'application/json' end |
#iiif_search_config ⇒ Object
29 30 31 |
# File 'app/controllers/concerns/blacklight_iiif_search/controller.rb', line 29 def iiif_search_config blacklight_config.iiif_search || {} end |
#iiif_search_params ⇒ Object
33 34 35 |
# File 'app/controllers/concerns/blacklight_iiif_search/controller.rb', line 33 def iiif_search_params params.permit(:q, :motivation, :date, :user, :solr_document_id, :page) end |
#iiif_suggest ⇒ Object
23 24 25 26 27 |
# File 'app/controllers/concerns/blacklight_iiif_search/controller.rb', line 23 def iiif_suggest suggest_search = IiifSuggestSearch.new(params, repository, self) render json: suggest_search.response, content_type: 'application/json' end |