Class: Admin::AdvancedSearchController

Inherits:
AdminController
  • Object
show all
Includes:
Blacklight::Catalog, BlacklightAdvancedSearch::Controller, BlacklightRangeLimit::ControllerOverride
Defined in:
app/controllers/admin/advanced_search_controller.rb

Instance Method Summary collapse

Instance Method Details

#adminObject

Administrative view of document

  • Sidecar Image

  • URIs



351
352
353
# File 'app/controllers/admin/advanced_search_controller.rb', line 351

def admin
  _, @document = search_service.fetch(params[:id])
end

#facetsObject

Administrative view of adv search facets



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'app/controllers/admin/advanced_search_controller.rb', line 369

def facets
  # We want to find the facets available for the current search, but:
  # * IGNORING current query (add in facets_for_advanced_search_form filter)
  # * IGNORING current advanced search facets (remove add_advanced_search_to_solr filter)
  @response, = search_service.search_results do |search_builder|
    search_builder.except(:add_advanced_search_to_solr).append(:facets_for_advanced_search_form)
  end

  respond_to do |format|
    format.json do
      @presenter = Blacklight::JsonPresenter.new(@response,
        blacklight_config)
    end
  end
end

#fetchObject

Administrative view for array of document ids

  • bookmarks



357
358
359
360
361
362
363
364
365
366
# File 'app/controllers/admin/advanced_search_controller.rb', line 357

def fetch
  @response, = search_service.fetch(params[:id])

  respond_to do |format|
    format.json do
      @presenter = Blacklight::JsonPresenter.new(@response,
        blacklight_config)
    end
  end
end