Created
March 14, 2012 15:30
-
-
Save pristinenoise/2037280 to your computer and use it in GitHub Desktop.
blacklight config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.blacklight_config = Blacklight::Configuration.new do |config| | |
config.add_search_field 'all_fields', :label => 'All Fields' | |
case source | |
when 'Databases' | |
default_catalog_config(config, :display_fields, :sorts) | |
config.default_solr_params = { | |
:qt => "search", | |
:per_page => 15, | |
:fq => ['{!raw f=source_facet}database'] | |
} | |
config.add_facet_field "lc_1letter_facet", :label => "Call Number", :limit => 26, :open => false | |
config.add_facet_field "lc_2letter_facet", :label => "Refine Call Number", :limit => 26 | |
config.add_facet_field "language_facet", :label => "Language", :limit => 3 | |
config.add_facet_field "subject_topic_facet", :label => "Topic", :limit => 3 | |
config.add_facet_field "subject_geo_facet", :label => "Topic (Region)", :limit => 3 | |
config.add_facet_field "subject_era_facet", :label => "Topic (Era)", :limit => 3 | |
config.add_facet_field "subject_form_facet", :label => "Topic (Genre)", :limit => 3 | |
config.add_facet_field 'title_first_facet', :label => "Starts With" | |
when 'Archives' | |
default_catalog_config(config, :display_fields, :search_fields, :sorts) | |
config.default_solr_params = { | |
:qt => "search", | |
:per_page => 15, | |
:fq => ['{!raw f=source_facet}archive'] | |
} | |
config.add_facet_field "format", :label => "Format", :limit => 3 | |
config.add_facet_field "pub_date_sort", :label => "Publication Date", :limit => 3, :range => true | |
config.add_facet_field "author_facet", :label => "Author", :limit => 3 | |
config.add_facet_field "repository_facet", :label => "Repository", :limit => 3 | |
config.add_facet_field "location_facet", :label => "Location", :limit => 3 | |
config.add_facet_field "author_facet", :label => "Author", :limit => 3 | |
config.add_facet_field "language_facet", :label => "Language", :limit => 3 | |
config.add_facet_field "subject_topic_facet", :label => "Topic", :limit => 3 | |
config.add_facet_field "subject_geo_facet", :label => "Topic (Region)", :limit => 3 | |
config.add_facet_field "subject_era_facet", :label => "Topic (Era)", :limit => 3 | |
config.add_facet_field "subject_form_facet", :label => "Topic (Genre)", :limit => 3 | |
config.add_facet_field "lc_1letter_facet", :label => "Call Number", :limit => 26, :open => false | |
config.add_facet_field "lc_2letter_facet", :label => "Refine Call Number", :limit => 26 | |
when 'New Arrivals' | |
default_catalog_config(config) | |
config.default_solr_params = { | |
:qt => "search", | |
:per_page => 15, | |
:fq => ['{!raw f=acq_date_facet}Last 3 Months'] | |
} | |
when 'Catalog' | |
default_catalog_config(config) | |
when 'Academic Commons' | |
default_catalog_config(config, :solr_params, :search_fields) | |
config.show.html_title = "title_display" | |
config.show.heading = "title_display" | |
config.show.display_type = "format" | |
config.show.genre = "genre_facet" | |
config.show.author = "author_display" | |
config.index.show_link = "title_display" | |
config.index.record_display_type = "format" | |
config.add_facet_field 'author_facet', :label => 'Author' | |
config.add_facet_field 'department_facet', :label => 'Department' | |
config.add_facet_field 'subject_facet', :label => 'Subject' | |
config.add_facet_field 'pub_date_facet', :label => 'Publication Date',:range => true | |
config.add_facet_field 'genre_facet', :label => 'Content Type' | |
config.add_facet_field 'series_facet', :label => 'Series' | |
config.add_sort_field 'score desc, pub_date_sort desc, title_sort asc', :label => 'Relevance' | |
config.add_sort_field 'pub_date_sort asc, title_sort asc', :label => 'Published Earliest' | |
config.add_sort_field 'pub_date_sort desc, title_sort asc', :label => 'Published Latest' | |
config.add_sort_field 'author_sort asc, title_sort asc', :label => 'Author A-Z' | |
config.add_sort_field 'author_sort desc, title_sort asc', :label => 'Author Z-A' | |
config.add_sort_field 'title_sort asc, pub_date_sort desc', :label => 'Title A-Z' | |
config.add_sort_field 'title_sort desc, pub_date_sort desc', :label => 'Title Z-A' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment