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



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

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

#facetsObject

Administrative view of adv search facets



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

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



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

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