Sha256: 163a857d7fe9790cb3c05d1eac574233227f6a15b1bcb3d480e4d461922e3276
Contents?: true
Size: 1.42 KB
Versions: 3
Compression:
Stored size: 1.42 KB
Contents
# frozen_string_literal: true ## # Simplified catalog controller class CatalogController < ApplicationController include Blacklight::Catalog configure_blacklight do |config| ## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params config.default_solr_params = { qt: 'search', rows: 10, fl: '*' } # Blacklight 8 sets a default value to 'advanced' config.json_solr_path = nil config.header_component = Spotlight::HeaderComponent config.document_solr_path = 'get' config.document_unique_id_param = 'ids' # solr field configuration for search results/index views config.index.title_field = 'full_title_tesim' config.add_results_collection_tool(:sort_widget) config.add_results_collection_tool(:per_page_widget) config.add_results_collection_tool(:view_type_group) config.add_search_field 'all_fields', label: I18n.t('spotlight.search.fields.search.all_fields') config.add_sort_field 'relevance', sort: 'score desc', label: I18n.t('spotlight.search.fields.sort.relevance') config.add_field_configuration_to_solr_request! # enable facets: # https://github.com/projectblacklight/spotlight/issues/1812#issuecomment-327345318 config.add_facet_fields_to_solr_request! # Set which views by default only have the title displayed, e.g., # config.view.gallery.title_only_by_default = true end end
Version data entries
3 entries across 3 versions & 1 rubygems