diff --git a/Gemfile b/Gemfile index e3e19bb..eb97ae8 100644 --- a/Gemfile +++ b/Gemfile @@ -48,9 +48,7 @@ group :development do gem 'spring' end -group :test do - gem 'webmock' -end +gem 'webmock', group: :test gem 'blacklight', '>= 5.3.0' gem 'jettywrapper', '>= 2.0' @@ -62,6 +60,7 @@ gem 'blacklight-marc', '~> 5.0' gem 'config', '~> 1.0.0.beta3' gem 'mods_display', '0.3.4' gem 'coderay' +gem 'blacklight_range_limit' group :deployment do gem 'capistrano', '~> 3.0' diff --git a/Gemfile.lock b/Gemfile.lock index d38298e..e5d880f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,6 +55,10 @@ GEM blacklight (~> 5.10) marc (>= 0.4.3, < 1.1) rails + blacklight_range_limit (5.2.0) + blacklight (~> 5.15) + jquery-rails + rails (>= 3.0, < 5.0) bootstrap-sass (3.3.5.1) autoprefixer-rails (>= 5.0.0.1) sass (>= 3.3.0) @@ -325,6 +329,7 @@ PLATFORMS DEPENDENCIES blacklight (>= 5.3.0) blacklight-marc (~> 5.0) + blacklight_range_limit byebug capistrano (~> 3.0) capistrano-bundler diff --git a/Rakefile b/Rakefile index 1917855..a76f57a 100644 --- a/Rakefile +++ b/Rakefile @@ -14,6 +14,7 @@ task ci: [:environment] do Rake::Task['db:migrate'].invoke Rake::Task['jetty:download'].invoke Rake::Task['jetty:unzip'].invoke + Rake::Task['colligo:copy_solr_configs'].invoke Jettywrapper.wrap(Jettywrapper.load_config) do Rake::Task['spec'].invoke end diff --git a/app/assets/images/footer.png b/app/assets/images/footer.png new file mode 100644 index 0000000..10f7dc3 Binary files /dev/null and b/app/assets/images/footer.png differ diff --git a/app/assets/images/iiif-logo.png b/app/assets/images/iiif-logo.png new file mode 100644 index 0000000..3280c1f Binary files /dev/null and b/app/assets/images/iiif-logo.png differ diff --git a/app/assets/images/other.png b/app/assets/images/other.png new file mode 100644 index 0000000..a51b777 Binary files /dev/null and b/app/assets/images/other.png differ diff --git a/app/assets/images/parker.png b/app/assets/images/parker.png new file mode 100644 index 0000000..7b50e80 Binary files /dev/null and b/app/assets/images/parker.png differ diff --git a/app/assets/images/play-arrow-16-1.png b/app/assets/images/play-arrow-16-1.png new file mode 100644 index 0000000..e6e3eff Binary files /dev/null and b/app/assets/images/play-arrow-16-1.png differ diff --git a/app/assets/images/play-arrow-20-1.png b/app/assets/images/play-arrow-20-1.png new file mode 100644 index 0000000..1150058 Binary files /dev/null and b/app/assets/images/play-arrow-20-1.png differ diff --git a/app/assets/images/play-arrow-32-1.png b/app/assets/images/play-arrow-32-1.png new file mode 100644 index 0000000..2719f26 Binary files /dev/null and b/app/assets/images/play-arrow-32-1.png differ diff --git a/app/assets/images/stanford.png b/app/assets/images/stanford.png new file mode 100644 index 0000000..bae37c2 Binary files /dev/null and b/app/assets/images/stanford.png differ diff --git a/app/assets/images/walter.png b/app/assets/images/walter.png new file mode 100644 index 0000000..e9bdd0d Binary files /dev/null and b/app/assets/images/walter.png differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 10d55ca..58f04b5 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -15,5 +15,9 @@ //= require turbolinks// // Required by Blacklight //= require blacklight/blacklight - //= require_tree . +// +// For blacklight_range_limit built-in JS, if you don't want it you don't need +// this: +//= require 'blacklight_range_limit' + diff --git a/app/assets/javascripts/browse_century.js b/app/assets/javascripts/browse_century.js new file mode 100644 index 0000000..82383dc --- /dev/null +++ b/app/assets/javascripts/browse_century.js @@ -0,0 +1,200 @@ +window.onload = function () { + // Vertical slider + var century_slider = $("#century_slider"); + var boundaries = century_slider.data('boundaries'); + // var slider_ticks = century_slider.data('ticks'); + var min = boundaries[0]; + var max = boundaries[1]; + //*******Century HORIZONTAL BAR CHART + //http://www.jqueryflottutorial.com/how-to-make-jquery-flot-horizontal-bar-chart.html + var century_panel = $('#century_panel'); + var rawData = century_panel.data('rawdata'); + var ticks = century_panel.data('ticks'); + var pointer_lookup = century_panel.data('pointerlookup'); + // var display_ratio = 1/(1.618 * 2); + century_panel.height( century_panel.width() * 2 ); + var dataSet = [{ label: "", data: rawData, color: "#009933" }]; + var options = { + series: { + bars: { + show: true + } + }, + bars: { + align: "center", + barWidth: 80, + horizontal: true, + fillColor: { colors: [{ opacity: 0.5 }, { opacity: 1}] }, + lineWidth: 1 + }, + yaxis: { + //axisLabel: "Precious Metals", + //axisLabelUseCanvas: true, + //axisLabelFontSizePixels: 12, + //axisLabelFontFamily: 'Verdana, Arial', + //axisLabelPadding: 3, + //tickColor: "#5E5E5E", + ticks: ticks, + color: "white", + tickDecimals: 0 + }, + //legend: { + // noColumns: 0, + // labelBoxBorderColor: "#858585", + // position: "ne" + //}, + grid: { + hoverable: true, + borderWidth: 0, + backgroundColor: { colors: ["#ffffff", "#ffffff"] }, + autoHighlight: true, + clickable: true + } + }; + //******Plot the graph, draw the slider, and define event handlers + $(document).ready(function () { + var plot; + var browse_century = $("#browse_century"); + var form = $("#century").find("form.range_limit"); + var begin_el = form.find("input.range_begin"); + var end_el = form.find("input.range_end"); + // Plot the graph + plot = $.plot(browse_century, dataSet, options); + var find_segment_for = function_for_find_segment(pointer_lookup); + var last_segment = null; + // plothover event + browse_century.bind("plothover", function (event, pos, item) { + if (item) { + var segment = find_segment_for(pos.y); + var msg = segment.label + ' (' + segment.count + ')'; + if (segment == last_segment) { + $("#tooltip").remove(); + last_segment = null; + } else { + $("#tooltip").remove(); + showTooltip(item.pageX, item.pageY, '#000000', msg); + last_segment = segment; + } + } + }); + // define the slider + var placeholder_input = $('').appendTo(century_slider); + if (placeholder_input.slider !== undefined) { + placeholder_input.slider({ + min: min, + max: max, + value: [min, max], + tooltip_position: "left", + orientation: 'vertical', + reversed: true, + //step: 100, + //ticks: slider_ticks, + handle: 'custom' + }); + } + // Match slider height to plot + var slider_body = $(".slider.slider-vertical"); + slider_body.height( plot.height()-35 ); + slider_body.css('margin-top',"25px"); + // set values of form elements to min and max + begin_el.val(min); + end_el.val(max); + // on plot click + browse_century.bind("plotclick", function (event, pos, item) { + if ( plot.getSelection() == null) { + var segment = find_segment_for(pos.y); + plot.setSelection( normalized_selection(segment.from, segment.to)); + begin_el.val(segment.from); + end_el.val(segment.to); + var slider_placeholder = century_slider.find("[data-slider-placeholder]"); + if (slider_placeholder) { + slider_placeholder.slider("setValue", [segment.from, segment.to]); + } + } + }); + // on plot select + browse_century.bind("plotselected plotselecting", function(event, ranges) { + if (ranges != null ) { + var from = Math.floor(ranges.yaxis.from); + var to = Math.floor(ranges.yaxis.to); + begin_el.val(from); + end_el.val(to); + var slider_placeholder = century_slider.find("[data-slider-placeholder]"); + if (slider_placeholder) { + slider_placeholder.slider("setValue", [from, to+1]); + } + } + }); + // on form input fields value change + form.find("input.range_begin, input.range_end").change(function () { + plot.setSelection( form_selection(form, min, max) , true ); + }); + begin_el.change( function() { + var val = BlacklightRangeLimit.parseNum($(this).val()); + if ( isNaN(val) || val < min) { + //for weird data, set slider at min + val = min; + } + var values = placeholder_input.data("slider").getValue(); + values[0] = val; + placeholder_input.slider("setValue", values); + }); + end_el.change( function() { + var val = BlacklightRangeLimit.parseNum($(this).val()); + if ( isNaN(val) || val > max ) { + //weird entry, set slider to max + val = max; + } + var values = placeholder_input.data("slider").getValue(); + values[1] = val; + placeholder_input.slider("setValue", values); + }); + // on slider value change + var slider_placeholder = century_slider.find("[data-slider-placeholder]"); + slider_placeholder.on("change", function(event) { + var values = $(event.target).data("slider").getValue(); + begin_el.val(values[0]); + end_el.val(values[1]); + plot.setSelection( normalized_selection(values[0], Math.max(values[0], values[1]-1)), true); + }); + }); + + function showTooltip(x, y, color, contents) { + $('
' + contents + '
').css({ + position: 'absolute', + display: 'none', + top: y - 10, + left: x + 10, + border: '2px solid ' + color, + padding: '3px', + 'font-size': '12px', + 'border-radius': '5px', + 'background-color': '#fff', + 'font-family': 'Verdana, Arial, Helvetica, Tahoma, sans-serif', + opacity: 0.9 + }).appendTo("body").fadeIn(200); + } + + function function_for_find_segment(pointer_lookup_arr) { + return function(y_coord) { + for (var i = pointer_lookup_arr.length-1 ; i >= 0 ; i--) { + var hash = pointer_lookup_arr[i]; + if (y_coord >= hash.from) { + return hash; + } + } + return pointer_lookup_arr[0]; + }; + } + + function normalized_selection(min, max) { + max += 0.99999; + return {xaxis: { 'from':min, 'to':max}} + } + + /* + function isInt(n) { + return n % 1 === 0; + } + */ +}; diff --git a/app/assets/javascripts/colligo.js b/app/assets/javascripts/colligo.js new file mode 100644 index 0000000..82e27c0 --- /dev/null +++ b/app/assets/javascripts/colligo.js @@ -0,0 +1,7 @@ +// Tabs on homepage +$(document).on('click', '.nav-tabs li', function() { + $(".nav-tabs li").removeClass("active"); + $(this).addClass("active"); + $("#main_search_field").val($(this).data("field")); + $("#q" ).focus(); +}); diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index f9cd5b3..5998963 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -10,6 +10,11 @@ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new * file per style scope. * + * Used by blacklight_range_limit + *= require 'blacklight_range_limit' + * *= require_tree . *= require_self - */ + * + * +*/ diff --git a/app/assets/stylesheets/colligo.css.scss b/app/assets/stylesheets/colligo.css.scss new file mode 100644 index 0000000..57bac8f --- /dev/null +++ b/app/assets/stylesheets/colligo.css.scss @@ -0,0 +1,81 @@ +#header-navbar .navbar-brand { + width: 300px; + height: 50px; + background: transparent none no-repeat scroll left top; + display: inline-block; + white-space: nowrap; + overflow: hidden; + padding-right: 0px; + margin-right: 20px; + padding-left: 5px; + text-indent: 50px; + font-size: 2.5em; +} + +/* Home page search */ +.navbar-form .nav-tabs { + border-bottom: 0px; +} + +.navbar-form .nav-tabs > li { + border-bottom: 1px solid #cccccc; +} + +.navbar-form .nav-tabs > li:active { + border-bottom: 0px; +} + +.navbar-form .input-group { + width: 100%; + border-top: 0px; + height: 35px; + border-top: 0px; +} + +.navbar-form .input-group > input { + border-top: 0px; +} + +h2, h3 { + color: #999; + font-weight: bold; +} + +.panel-body .btn-secondary { + margin: 3px; + padding: 3px; + border: 1px solid #cccccc; + width: 100%; + text-align: left; +} + +.panel-body .btn > img { + padding-right: 5px; +} + +.panel-body .btn-primary-outline { + color: #0275D8; + background-color: transparent; + background-image: none; + border-color: #0275D8; +} + +.panel-body .btn-primary { + margin: 0 5px 5px 0; +} + +#century_panel { + height: 400px; + text-align: center; + float:left; + position: relative; + padding-left: 0px; +} + +#century_slider { + height: auto; + width: 50px; + float: left; + position: relative; + padding-right: 0px; +} diff --git a/app/assets/stylesheets/colligo_slider.css.scss b/app/assets/stylesheets/colligo_slider.css.scss new file mode 100644 index 0000000..d125c61 --- /dev/null +++ b/app/assets/stylesheets/colligo_slider.css.scss @@ -0,0 +1,47 @@ +.slider-tick { + width: 2px; + height: 2px; +} + +.slider-handle.custom { + background: transparent asset_url('play-arrow-16-1.png') no-repeat scroll 0% 50%; +} +/* +.slider-track-low::before { + line-height: 20px; + font-size: 20px; + content: ; + color: #ccc; +} +*/ + +.slider-handle.custom::before { + content: none; + color: #ccc; +} + +.slider-tick.custom::before { + content: "-"; + color: #726204; +} + +.slider-selection.tick-slider-selection { + background-image: linear-gradient(to bottom, #aab 0%, #aaa 100%); + background-repeat: repeat-x; +} + +.slider-selection { + background-image: linear-gradient(to bottom, #aab 0%, #aaa 100%); + background-repeat: repeat-x; +} + +.slider-track { + background-image: linear-gradient(to bottom, #e5e5e5 0%, #e9e9e9 100%); + background-repeat: repeat-x; + box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1) inset; + border-radius: 4px; +} + +.slider.slider-vertical .slider-track { + width: 2px; +} diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8b79ffe..76c3bd0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,4 +6,14 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception + + helper_method :on_home_page, :request_path + + def on_home_page + request_path[:controller] == 'catalog' && request_path[:action] == 'index' && params[:f].blank? && params[:q].blank? && params[:range].blank? + end + + def request_path + Rails.application.routes.recognize_path(request.path) + end end diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 1e5dd7b..3318940 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -1,8 +1,7 @@ # -*- encoding : utf-8 -*- class CatalogController < ApplicationController - include Blacklight::Marc::Catalog - include Blacklight::Catalog + layout :resolve_layout configure_blacklight do |config| ## Default parameters to send to solr for all search-like requests. See also SearchBuilder#processed_parameters @@ -11,64 +10,45 @@ class CatalogController < ApplicationController rows: 10 } - # solr path which will be added to solr base url before the other solr params. - # config.solr_path = 'select' - - # items to show per page, each number in the array represent another option to choose from. - # config.per_page = [10,20,50,100] - - ## Default parameters to send on single-document requests to Solr. These settings are the Blackligt defaults (see SearchHelper#solr_doc_params) or - ## parameters included in the Blacklight-jetty document requestHandler. - # - # config.default_document_solr_params = { - # :qt => 'document', - # ## These are hard-coded in the blacklight 'document' requestHandler - # # :fl => '*', - # # :rows => 1 - # # :q => '{!raw f=id v=$id}' - # } - # solr field configuration for search results/index views config.index.title_field = 'title_display' config.index.display_type_field = 'format' - # solr field configuration for document/show views - # config.show.title_field = 'title_display' - # config.show.display_type_field = 'format' - - # solr fields that will be treated as facets by the blacklight application - # The ordering of the field names is the order of the display - # - # Setting a limit will trigger Blacklight's 'more' facet values link. - # * If left unset, then all facet values returned by solr will be displayed. - # * If set to an integer, then "f.somefield.facet.limit" will be added to - # solr request, with actual solr request being +1 your configured limit -- - # you configure the number of items you actually want _displayed_ in a page. - # * If set to 'true', then no additional parameters will be sent to solr, - # but any 'sniffed' request limit parameters will be used for paging, with - # paging at requested limit -1. Can sniff from facet.limit or - # f.specific_field.facet.limit solr request params. This 'true' config - # can be used if you set limits in :default_solr_params, or as defaults - # on the solr side in the request handler itself. Request handler defaults - # sniffing requires solr requests to be made with "echoParams=all", for - # app code to actually have it echo'd back to see it. - # - # :show may be set to false if you don't want the facet to be drawn in the - # facet bar config.add_facet_field 'format', label: 'Format' - config.add_facet_field 'pub_date', label: 'Publication Year', single: true - config.add_facet_field 'subject_topic_facet', label: 'Topic', limit: 20 - config.add_facet_field 'language_facet', label: 'Language', limit: true - config.add_facet_field 'lc_1letter_facet', label: 'Call Number' - config.add_facet_field 'subject_geo_facet', label: 'Region' - config.add_facet_field 'subject_era_facet', label: 'Era' - - config.add_facet_field 'example_pivot_field', label: 'Pivot Field', pivot: %w(format language_facet) - - config.add_facet_field 'example_query_facet_field', label: 'Publish Date', query: { - years_5: { label: 'within 5 Years', fq: "pub_date:[#{Time.now.year - 5} TO *]" }, - years_10: { label: 'within 10 Years', fq: "pub_date:[#{Time.now.year - 10} TO *]" }, - years_25: { label: 'within 25 Years', fq: "pub_date:[#{Time.now.year - 25} TO *]" } + config.add_facet_field 'type_of_resource_facet', label: 'Type of resource' + config.add_facet_field 'authors_all_facet', label: 'Authors' + config.add_facet_field 'topic_facet', label: 'Topic', limit: 20 + config.add_facet_field 'geographic_facet', label: 'Region' + config.add_facet_field 'era_facet', label: 'Era' + config.add_facet_field 'manuscript_facet', label: 'Manuscript' + config.add_facet_field 'language', label: 'Language', limit: 5 + config.add_facet_field 'place_search', label: 'Place of origin' + config.add_facet_field 'model', label: 'Type' + config.add_facet_field 'folio', label: 'Folio' + config.add_facet_field 'collection', label: 'Repository' + # config.add_facet_field 'example_pivot_field', label: 'Pivot Field', pivot: %w(format language) + config.add_facet_field 'date_range', label: 'Century', query: { + years_21: { label: '21st', fq: 'pub_date_t:[2000 TO *]' }, + years_20: { label: '20th', fq: 'pub_date_t:[1900 TO 1999]' }, + years_19: { label: '19th', fq: 'pub_date_t:[1800 TO 1899]' }, + years_18: { label: '18th', fq: 'pub_date_t:[1700 TO 1799]' }, + years_17: { label: '17th', fq: 'pub_date_t:[1600 TO 1699]' }, + years_16: { label: '16th', fq: 'pub_date_t:[1500 TO 1599]' }, + years_15: { label: '15th', fq: 'pub_date_t:[1400 TO 1499]' }, + years_14: { label: '14th', fq: 'pub_date_t:[1300 TO 1399]' }, + years_13: { label: '13th', fq: 'pub_date_t:[1200 TO 1299]' }, + years_12: { label: '12th', fq: 'pub_date_t:[1100 TO 1199]' }, + years_11: { label: '11th', fq: 'pub_date_t:[1000 TO 1099]' }, + years_10: { label: '10th', fq: 'pub_date_t:[900 TO 999]' }, + years_9: { label: '9th', fq: 'pub_date_t:[800 TO 899]' }, + years_8: { label: '8th', fq: 'pub_date_t:[700 TO 799]' }, + years_7: { label: '7th', fq: 'pub_date_t:[600 TO 699]' }, + years_6: { label: '6th', fq: 'pub_date_t:[500 TO 599]' }, + years_5: { label: '5th', fq: 'pub_date_t:[400 TO 499]' }, + years_4: { label: '4th', fq: 'pub_date_t:[300 TO 399]' }, + years_3: { label: '3rd', fq: 'pub_date_t:[200 TO 299]' }, + years_2: { label: '2nd', fq: 'pub_date_t:[100 TO 199]' }, + years_1: { label: '1st', fq: 'pub_date_t:[0 TO 99]' } } # Have BL send all facet field names to Solr, which has been the default @@ -79,101 +59,135 @@ class CatalogController < ApplicationController # solr fields to be displayed in the index (search results) view # The ordering of the field names is the order of the display config.add_index_field 'title_display', label: 'Title' - config.add_index_field 'title_vern_display', label: 'Title' - config.add_index_field 'author_display', label: 'Author' - config.add_index_field 'author_vern_display', label: 'Author' + config.add_index_field 'authors_all_display', label: 'Author' config.add_index_field 'format', label: 'Format' - config.add_index_field 'language_facet', label: 'Language' - config.add_index_field 'published_display', label: 'Published' - config.add_index_field 'published_vern_display', label: 'Published' - config.add_index_field 'lc_callnum_display', label: 'Call number' - + config.add_index_field 'language', label: 'Language' + config.add_index_field 'abstract_display', label: 'Abstract' + config.add_index_field 'topic_display', label: 'Topic' + config.add_index_field 'geographic_display', label: 'Region' + config.add_index_field 'era_display', label: 'Era' + config.add_index_field 'pub_date_display', label: 'Date' + config.add_index_field 'collection', label: 'Repository' # solr fields to be displayed in the show (single result) view # The ordering of the field names is the order of the display config.add_show_field 'title_display', label: 'Title' - config.add_show_field 'title_vern_display', label: 'Title' config.add_show_field 'subtitle_display', label: 'Subtitle' - config.add_show_field 'subtitle_vern_display', label: 'Subtitle' - config.add_show_field 'author_display', label: 'Author' - config.add_show_field 'author_vern_display', label: 'Author' + config.add_show_field 'title_alternate_display', label: 'Alternate titles' + config.add_show_field 'title_other_display', label: 'Other titles' + config.add_show_field 'authors_all_display', label: 'Author' config.add_show_field 'format', label: 'Format' - config.add_show_field 'url_fulltext_display', label: 'URL' - config.add_show_field 'url_suppl_display', label: 'More Information' - config.add_show_field 'language_facet', label: 'Language' - config.add_show_field 'published_display', label: 'Published' - config.add_show_field 'published_vern_display', label: 'Published' - config.add_show_field 'lc_callnum_display', label: 'Call number' - config.add_show_field 'isbn_t', label: 'ISBN' + config.add_show_field 'language', label: 'Language' + config.add_show_field 'pub_date_display', label: 'Date' + config.add_show_field 'collection', label: 'Repository' # "fielded" search configuration. Used by pulldown among other places. # For supported keys in hash, see rdoc for Blacklight::SearchFields - # - # Search fields will inherit the :qt solr request handler from - # config[:default_solr_parameters], OR can specify a different one - # with a :qt key/value. Below examples inherit, except for subject - # that specifies the same :qt as default for our own internal - # testing purposes. - # - # The :key is what will be used to identify this BL search field internally, - # as well as in URLs -- so changing it after deployment may break bookmarked - # urls. A display label will be automatically calculated from the :key, - # or can be specified manually to be different. - - # This one uses all the defaults set by the solr request handler. Which - # solr request handler? The one set in config[:default_solr_parameters][:qt], - # since we aren't specifying it otherwise. - config.add_search_field 'all_fields', label: 'All Fields' - # Now we see how to over-ride Solr request handler defaults, in this - # case for a BL "search field", which is really a dismax aggregate - # of Solr search fields. - - config.add_search_field('title') do |field| - # solr_parameters hash are sent to Solr as ordinary url query params. - field.solr_parameters = { 'spellcheck.dictionary': 'title' } - - # :solr_local_parameters will be sent using Solr LocalParams - # syntax, as eg {! qf=$title_qf }. This is neccesary to use - # Solr parameter de-referencing like $title_qf. - # See: http://wiki.apache.org/solr/LocalParams - field.solr_local_parameters = { - qf: '$title_qf', - pf: '$title_pf' - } + config.add_search_field('descriptions') do |field| + field.qt = 'descriptions' end - config.add_search_field('author') do |field| - field.solr_parameters = { 'spellcheck.dictionary': 'author' } - field.solr_local_parameters = { - qf: '$author_qf', - pf: '$author_pf' - } + config.add_search_field('transcriptions') do |field| + field.qt = 'transcriptions' end - # Specifying a :qt only to show it's possible, and so our internal automated - # tests can test it. In this case it's the same as - # config[:default_solr_parameters][:qt], so isn't actually neccesary. - config.add_search_field('subject') do |field| - field.solr_parameters = { 'spellcheck.dictionary': 'subject' } - field.qt = 'search' - field.solr_local_parameters = { - qf: '$subject_qf', - pf: '$subject_pf' - } + config.add_search_field('annotations') do |field| + field.qt = 'annotations' end # "sort results by" select (pulldown) # label in pulldown is followed by the name of the SOLR field to sort by and # whether the sort is ascending or descending (it must be asc or desc # except in the relevancy case). - config.add_sort_field 'score desc, pub_date_sort desc, title_sort asc', label: 'relevance' - config.add_sort_field 'pub_date_sort desc, title_sort asc', label: 'year' - config.add_sort_field 'author_sort asc, title_sort asc', label: 'author' - config.add_sort_field 'title_sort asc, pub_date_sort desc', label: 'title' + config.add_sort_field 'score desc, title_sort asc', label: 'relevance' + config.add_sort_field 'authors_all_facet asc, title_sort asc', label: 'author' + config.add_sort_field 'pub_date_sort asc, title_sort asc', label: 'date' # If there are more than this many search results, no spelling ("did you # mean") suggestion is offered. config.spell_max = 5 end + + def index + if on_home_page + blacklight_config.add_facet_field 'pub_date_t', label: 'Publication Year', range: { + num_segments: 21, + assumed_boundaries: [0, 2999], + segments: true + } + manuscripts + annotations + plot_data + render 'homepage' + else + super + end + end + + private + + def resolve_layout + if on_home_page + 'homepage' + else + 'blacklight' + end + end + + def manuscripts + self.search_params_logic += [:add_manuscript_filter] + self.search_params_logic -= [:all_search_filter, :add_annotation_filter, :add_transcription_filter] + (@response_m, @document_list_m) = get_search_results + end + + def annotations + self.search_params_logic += [:add_annotation_filter] + self.search_params_logic -= [:all_search_filter, :add_manuscript_filter, :add_transcription_filter] + (@response_a, @document_list_a) = get_search_results + end + + def transcriptions + self.search_params_logic += [:add_transcription_filter] + self.search_params_logic -= [:all_search_filter, :add_manuscript_filter, :add_annotation_filter] + (@response_t, @document_list_t) = get_search_results + end + + def plot_data + data = solr_range_queries_to_a('pub_date_t') + @data_array = [] + @data_ticks = [] + @pointer_lookup = [] + @slider_ticks = [] + # @slider_labels = [] + data.each do |val| + @data_array << [val[:count], val[:from]] + if val[:from] == 0 + label = '1st' + elsif val[:from] == 100 + label = '2nd' + elsif val[:from] == 200 + label = '3rd' + else + label = "#{((val[:from] / 100) + 1)}th" + end + @data_ticks << [val[:from], label] + @slider_ticks << val[:from] + # @slider_labels << label + @pointer_lookup << { 'from': val[:from], 'to': val[:to], 'count': val[:count], 'label': "#{val[:from]} to #{val[:to]}" } + end + @boundaries = [@data_array.first.last, @data_array.last.last] + end + + def solr_range_queries_to_a(solr_field) + return [] unless @response_m['facet_counts'] && @response_m['facet_counts']['facet_queries'] + array = [] + @response_m['facet_counts']['facet_queries'].each_pair do |query, count| + if query =~ /#{solr_field}: *\[ *(\d+) *TO *(\d+) *\]/ + array << { from: Regexp.last_match(1).to_i, to: Regexp.last_match(2).to_i, count: count.to_i } + end + end + array = array.sort_by { |hash| hash[:from].to_i } + array + end end diff --git a/app/helpers/blacklight_helper.rb b/app/helpers/blacklight_helper.rb new file mode 100644 index 0000000..3830259 --- /dev/null +++ b/app/helpers/blacklight_helper.rb @@ -0,0 +1,7 @@ +module BlacklightHelper + include Blacklight::BlacklightHelperBehavior + + def application_name + 'Colligo' + end +end diff --git a/app/models/search_builder.rb b/app/models/search_builder.rb index efcef22..26a62e9 100644 --- a/app/models/search_builder.rb +++ b/app/models/search_builder.rb @@ -1,3 +1,19 @@ class SearchBuilder < Blacklight::SearchBuilder include Blacklight::Solr::SearchBuilderBehavior + + def add_manuscript_filter(solr_parameters) + solr_parameters[:qt] = 'descriptions' + end + + def add_annotation_filter(solr_parameters) + solr_parameters[:qt] = 'annotations' + end + + def add_transcription_filter(solr_parameters) + solr_parameters[:qt] = 'transcriptions' + end + + def all_search_filter(solr_parameters) + solr_parameters[:qt] = 'search' + end end diff --git a/app/models/solr_document.rb b/app/models/solr_document.rb index 88e3163..debcd07 100644 --- a/app/models/solr_document.rb +++ b/app/models/solr_document.rb @@ -10,13 +10,6 @@ def initialize(*args) super end - # The following shows how to setup this blacklight document to display marc documents - extension_parameters[:marc_source_field] = :marc_display - extension_parameters[:marc_format_type] = :marcxml - use_extension(Blacklight::Solr::Document::Marc) do |document| - document.key?(:marc_display) - end - field_semantics.merge!( title: 'title_display', author: 'author_display', @@ -37,14 +30,4 @@ def initialize(*args) # and Blacklight::Document::SemanticFields#to_semantic_values # Recommendation: Use field names from Dublin Core use_extension(Blacklight::Document::DublinCore) - - # This abstraction method may become useful while - # we're between using the new and old format facet - def format_key - :format_main_ssim - end - - def file_ids - self[:img_info] || self[:file_id] - end end diff --git a/app/views/catalog/_homepage/_annotations_author.html.erb b/app/views/catalog/_homepage/_annotations_author.html.erb new file mode 100644 index 0000000..0df38b5 --- /dev/null +++ b/app/views/catalog/_homepage/_annotations_author.html.erb @@ -0,0 +1,6 @@ +
+
+

by author

+
+
+ diff --git a/app/views/catalog/_homepage/_annotations_recent.html.erb b/app/views/catalog/_homepage/_annotations_recent.html.erb new file mode 100644 index 0000000..b4c1c1c --- /dev/null +++ b/app/views/catalog/_homepage/_annotations_recent.html.erb @@ -0,0 +1,6 @@ +
+
+

by most recent

+
+
+ diff --git a/app/views/catalog/_homepage/_century.html.erb b/app/views/catalog/_homepage/_century.html.erb new file mode 100644 index 0000000..708e6bb --- /dev/null +++ b/app/views/catalog/_homepage/_century.html.erb @@ -0,0 +1,23 @@ +<%- # requires solr_config local passed in + label = facet_field_label('pub_date_t') + input_label_range_begin = t('blacklight.range_limit.range_begin', field_label: label) + input_label_range_end = t('blacklight.range_limit.range_end', field_label: label) +-%> + +
+

by century

+ <%= content_tag :div, class: 'col col-md-3', id: 'century_slider', data: {boundaries: @boundaries, ticks: @slider_ticks} do %> + <% end %> + + <%= content_tag :div, class: 'col col-md-9', id: 'century_panel', data: {rawdata: @data_array, ticks: @data_ticks, pointerlookup: @pointer_lookup} do %> +
+
+ <% end %> + + <%= form_tag catalog_index_path, :method => :get, :class=> 'range_limit subsection range_pub_date_t form-inline' do %> + <%= hidden_field_tag('search_field', 'descriptions', id: 'search_descriptions_century') %> + <%= render_range_input( 'pub_date_t', :begin, input_label_range_begin) %> – <%= render_range_input('pub_date_t', :end, input_label_range_end) %> + <%= submit_tag t('blacklight.range_limit.submit_limit'), :class=>'submit btn btn-default' %> + <% end %> + +
\ No newline at end of file diff --git a/app/views/catalog/_homepage/_home.html.erb b/app/views/catalog/_homepage/_home.html.erb new file mode 100644 index 0000000..8a698e3 --- /dev/null +++ b/app/views/catalog/_homepage/_home.html.erb @@ -0,0 +1,41 @@ +<% @response = @response_m %> +<% @document_list = @document_list_m %> + +
+
+ <%= render :partial=>'/catalog/_homepage/home_text' %> +
+
+
+
+ +
+
+

Browse manuscripts

+
+
+ <%= render :partial=>'/catalog/_homepage/repository' %> + <%= render :partial=>'/catalog/_homepage/language' %> +
+
+ <%= render :partial=>'/catalog/_homepage/century' %> +
+
+
+
+

& annotations

+
+ <%= render :partial=>'/catalog/_homepage/annotations_recent' %> +
+
+ <%= render :partial=>'/catalog/_homepage/annotations_author' %> +
+
+
diff --git a/app/views/catalog/_homepage/_home_search_form.html.erb b/app/views/catalog/_homepage/_home_search_form.html.erb new file mode 100644 index 0000000..2f2f397 --- /dev/null +++ b/app/views/catalog/_homepage/_home_search_form.html.erb @@ -0,0 +1,24 @@ +<%= form_tag search_action_url, method: :get, class: 'navbar-form', role: 'search' do %> + <%#= render_hash_as_hidden_fields(search_state.params_for_search.except(:q, :search_field, :qt, :page, :utf8)) %> + <%= hidden_field_tag :search_field, search_fields.first.last, id: 'main_search_field' %> + <% if search_fields.length > 1 %> + + <% end %> +
+ <%= text_field_tag :q, params[:q], placeholder: t('blacklight.search.form.search.placeholder'), + class: 'form-control', id: 'q', autofocus: should_autofocus_on_search_box?, style: 'width:100%' %> + <%#, data: { autocomplete_enabled: autocomplete_enabled?, autocomplete_path: blacklight.suggest_index_path } %> + +
+ +
+
+<% end %> diff --git a/app/views/catalog/_homepage/_home_text.html.erb b/app/views/catalog/_homepage/_home_text.html.erb new file mode 100644 index 0000000..515643e --- /dev/null +++ b/app/views/catalog/_homepage/_home_text.html.erb @@ -0,0 +1 @@ +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vestibulum dui ut nibh venenatis faucibus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam cursus varius tortor, vitae sodales elit lacinia sit amet. In posuere lacus eros, a viverra ex tristique ac. Mauris et lectus est. Aliquam nec cursus nibh, consequat blandit massa. Vestibulum molestie, nunc ac semper consectetur, mauris ex sodales orci, in accumsan ante justo sed augue. Nunc auctor porttitor libero, vitae lobortis diam tempus eu. Praesent suscipit faucibus nibh, eu fermentum mauris dignissim rhoncus.

diff --git a/app/views/catalog/_homepage/_language.html.erb b/app/views/catalog/_homepage/_language.html.erb new file mode 100644 index 0000000..695b50d --- /dev/null +++ b/app/views/catalog/_homepage/_language.html.erb @@ -0,0 +1,9 @@ +
+
+

by language

+ <%= safe_join(facets_from_request(['language']).map do |display_facet| %> + <%= render_facet_limit(display_facet, {:layout => 'catalog/_homepage/language_layout', :partial => 'catalog/_homepage/language_facet_limit'}) %> + <% end.compact, "\n") %> +
+
+ diff --git a/app/views/catalog/_homepage/_language_facet_limit.html.erb b/app/views/catalog/_homepage/_language_facet_limit.html.erb new file mode 100644 index 0000000..80e2f8c --- /dev/null +++ b/app/views/catalog/_homepage/_language_facet_limit.html.erb @@ -0,0 +1,17 @@ + diff --git a/app/views/catalog/_homepage/_language_layout.html.erb b/app/views/catalog/_homepage/_language_layout.html.erb new file mode 100644 index 0000000..37f0bdd --- /dev/null +++ b/app/views/catalog/_homepage/_language_layout.html.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/app/views/catalog/_homepage/_repository.html.erb b/app/views/catalog/_homepage/_repository.html.erb new file mode 100644 index 0000000..17ed5ea --- /dev/null +++ b/app/views/catalog/_homepage/_repository.html.erb @@ -0,0 +1,23 @@ +
+
+

by repository

+ <% @response['facet_counts']['facet_fields']['collection'].each_with_index do |r, i| %> + <% if i.even? %> + <% case %> + <% when r.include?('Stanford') %> + <% fname = 'stanford.png' %> + <% when r.include?('Parker') %> + <% fname = 'parker.png' %> + <% when r.include?('Walter') %> + <% fname = 'walter.png' %> + <% else %> + <% fname = 'other.png' %> + <% end %> + " class="btn btn-secondary"> + <%= image_tag(fname) %> + <%= r %> + + <% end %> + <% end %> +
+
\ No newline at end of file diff --git a/app/views/catalog/homepage.html.erb b/app/views/catalog/homepage.html.erb new file mode 100644 index 0000000..bf91770 --- /dev/null +++ b/app/views/catalog/homepage.html.erb @@ -0,0 +1,5 @@ +
+ <%# if there are no input/search related params, display the "home" partial -%> + <%= render 'catalog/_homepage/home' %> + <%= render 'shared/sitelinks_search_box' %> +
diff --git a/app/views/layouts/homepage.html.erb b/app/views/layouts/homepage.html.erb new file mode 100644 index 0000000..b7ddfda --- /dev/null +++ b/app/views/layouts/homepage.html.erb @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + <%= render_page_title %> + <%= opensearch_description_tag application_name, opensearch_catalog_url(:format => 'xml') %> + <%= favicon_link_tag 'favicon.ico' %> + <%= stylesheet_link_tag "application", media: "all" %> + <%= javascript_include_tag "application" %> + <%= csrf_meta_tags %> + <%= content_for(:head) %> + + + + + + + <%= render :partial => 'shared/homepage_header_navbar' %> + + <%= render partial: 'shared/ajax_modal' %> + +
+ <%= content_tag :h1, application_name, class: 'sr-only application-heading' %> + + <%= render :partial=>'/flash_msg', layout: 'shared/flash_messages' %> + +
+ <%= yield %> +
+
+ + <%= render :partial => 'shared/footer' %> + + diff --git a/app/views/shared/_homepage_header_navbar.html.erb b/app/views/shared/_homepage_header_navbar.html.erb new file mode 100644 index 0000000..2117e60 --- /dev/null +++ b/app/views/shared/_homepage_header_navbar.html.erb @@ -0,0 +1,18 @@ + + diff --git a/config/application.rb b/config/application.rb index 4e9b788..c7a2722 100644 --- a/config/application.rb +++ b/config/application.rb @@ -23,6 +23,6 @@ class Application < Rails::Application # Do not swallow errors in after_commit/after_rollback callbacks. config.active_record.raise_in_transactional_callbacks = true - WebMock.disable! if Rails.env.test? + WebMock.disable! if Rails.env.test? end end diff --git a/config/locales/blacklight.en.yml b/config/locales/blacklight.en.yml index ff834b2..31566f9 100644 --- a/config/locales/blacklight.en.yml +++ b/config/locales/blacklight.en.yml @@ -1,3 +1,5 @@ en: blacklight: - application_name: 'Blacklight' \ No newline at end of file + application_name: 'Colligo' + range_limit: + submit_limit: 'Apply range' diff --git a/config/solr_configs/solrconfig.xml b/config/solr_configs/solrconfig.xml index 141cd94..85ee0b3 100644 --- a/config/solr_configs/solrconfig.xml +++ b/config/solr_configs/solrconfig.xml @@ -204,121 +204,6 @@ collection_search^2 all_search^2 - - - title_exact_search^350 body_chars_exact_search^350 - title_unstem_search^100 body_chars_unstem_search^100 - title_search^75 body_chars_search^75 - subtitle_unstem_search^75 - subtitle_search^50 - title_alternate_unstem_search^50 - title_alternate_search^20 - title_other_unstem_search^20 - title_other_search^10 - - - title_exact_search^1750 body_chars_exact_search^1750 - title_unstem_search^500 body_chars_unstem_search^500 - title_search^375 body_chars_search^375 - subtitle_unstem_search^375 - subtitle_search^250 - title_alternate_unstem_search^250 - title_alternate_search^100 - title_other_unstem_search^100 - title_other_search^50 - - - title_search^300 body_chars_search^300 - subtitle_search^225 - title_alternate_search^150 - title_other_search^60 - - - title_search^200 body_chars_search^200 - subtitle_search^150 - title_alternate_search^100 - title_other_search^40 - - - - personal_authors_unstem_search^20 - personal_authors_search^5 - corporate_authors_unstem_search^10 - corporate_authors_search^2 - authors_all_unstem_search^2 - authors_all_search - - - personal_authors_search^100 - corporate_authors_search^50 - authors_all_search^10 - - - personal_authors_search^60 - corporate_authors_search^30 - authors_all_search^5 - - - personal_authors_search^40 - corporate_authors_search^20 - authors_all_search^2 - - - - topic_unstem_search^50 - topic_search^30 - geographic_unstem_search^30 - geographic_search^20 - era_unstem_search^20 - era_search^10 - subject_other_unstem_search^10 - subject_other_search^5 - subject_all_unstem_search^2 - subject_all_search - - - topic_unstem_search^250 - topic_search^150 - geographic_unstem_search^150 - geographic_search^100 - era_unstem_search^100 - era_search^50 - subject_other_unstem_search^25 - subject_other_search^25 - subject_all_unstem_search^10 - subject_all_search^5 - - - topic_search^150 - subject_all_search^75 - - - topic_search^100 - subject_all_search^50 - - - - - id - druid - - - - - abstract_unstem_search^10 - abstract_search - - - abstract_unstem_search^20 - abstract_search^5 - - - abstract_search^3 - - - abstract_search^2 - - true 1 21 @@ -415,78 +300,181 @@ 1 - - - + + - lucene + edismax explicit - score desc, title_sort asc - text + + score desc, pub_date_sort desc, title_sort asc + 20 + *:* + 6<-1 6<90% + 1 + 0 + 0.01 + false + + all_search AND - 1 - - 1 - 3 - 0.01 + + title_exact_search^1000 body_chars_exact_search^1000 + title_unstem_search^500 body_chars_unstem_search^500 + title_search^75 body_chars_search^75 + subtitle_unstem_search^75 + subtitle_search^75 + title_alternate_unstem_search^50 + title_alternate_search^20 + title_other_search^20 + title_other_unstem_search^20 + + personal_authors_unstem_search^25 + personal_authors_search^20 + corporate_authors_unstem_search^20 + corporate_authors_search^10 + authors_all_unstem_search^10 + authors_all_search^5 + + topic_unstem_search^50 + topic_search^20 + geographic_unstem_search^20 + geographic_search^15 + era_unstem_search^15 + era_search^10 + subject_other_unstem_search^10 + subject_other_search^5 + subject_all_unstem_search^5 + subject_all_search^2 + + manuscript_unstem_search^5 + manuscript_search^2 + abstract_unstem_search^5 + abstract_search^2 + + pub_date^2 + id + collection_search + all_unstem_search^5 + all_search + + + title_exact_search^5000 body_chars_exact_search^5000 + title_unstem_search^2500 body_chars_unstem_search^2500 + title_search^375 body_chars_search^375 + subtitle_unstem_search^375 + subtitle_search^250 + title_alternate_unstem_search^250 + title_alternate_search^100 + title_other_unstem_search^100 + title_other_search^75 - - - personal_authors_unstem_search^200 + personal_authors_unstem_search^125 + personal_authors_search^100 corporate_authors_unstem_search^100 + corporate_authors_search^50 authors_all_unstem_search^50 - authors_all_search^20 - - - personal_authors_unstem_search^2000 - corporate_authors_unstem_search^500 - authors_all_unstem_search^300 - authors_all_search^200 - + authors_all_search^25 - - - title_unstem_search^50000 body_chars_unstem_search^50000 - subtitle_unstem_search^25000 - title_alternate_unstem_search^10000 - title_other_unstem_search^5000 - title_search^2500 - - - title_unstem_search^500000 body_chars_unstem_search^50000 - subtitle_unstem_search^250000 - title_alternate_unstem_search^100000 - title_other_unstem_search^50000 - title_search^25000 - + topic_unstem_search^250 + topic_search^150 + geographic_unstem_search^150 + geographic_search^100 + era_unstem_search^100 + era_search^50 + subject_other_unstem_search^50 + subject_other_search^25 + subject_all_unstem_search^25 + subject_all_search^10 + + manuscript_unstem_search^25 + manuscript_search^10 + abstract_unstem_search^25 + abstract_search^10 - - - topic_unstem_search^200 - geographic_unstem_search^125 - era_unstem_search^125 - subject_all_unstem_search^100 - topic_facet^100 + pub_date^10 + collection_search^5 + all_unstem_search^25 + all_search^5 - - topic_unstem_search^2000 - geographic_unstem_search^1250 - era_unstem_search^1000 - subject_all_unstem_search^750 - topic_facet^500 - subject_all_facet^100 + + title_search^1500 body_chars_search^1500 + subtitle_search^225 + title_alternate_search^150 + title_other_search^60 + + personal_authors_search^75 + corporate_authors_search^60 + authors_all_search^30 + + topic_search^150 + geographic_search^60 + era_search^50 + subject_other_search^30 + subject_all_search^15 + + manuscript_search^7.5 + abstract_search^7.5 + collection_search^3 + all_search^3 + + title_search^1000 body_chars_search^1000 + subtitle_search^150 + title_alternate_search^100 + title_other_search^40 + + personal_authors_search^50 + corporate_authors_search^40 + authors_all_search^20 - - droid + topic_search^100 + geographic_search^40 + era_search^30 + subject_other_search^20 + subject_all_search^10 - - text - text^10 + manuscript_search^5 + abstract_search^5 + collection_search^2 + all_search^2 + + true + 1 + 21 + genre_facet + enum + type_of_resource_facet + personal_authors_facet + corporate_authors_facet + authors_all_facet + physical_description_form_facet + physical_description_media_type_facet + physical_location_display + language + enum + folio + enum + topic_facet + geographic_facet + era_facet + subject_all_facet + format + model + collection + enum + format + 20 + enum + pub_date_t + enum + druid + enum + manuscript_facet + enum - + score, id, abstract_display, access_condition_display, @@ -525,49 +513,446 @@ manuscript_display, folio + + + model:Manuscript + + - true - 1 - 10 - type_of_resource_facet - personal_authors_facet - corporate_authors_facet - authors_all_facet - physical_description_form_facet - physical_description_media_type_facet - physical_location_display - language - enum - folio - enum - topic_facet - geographic_facet - era_facet - subject_all_facet - format - model - collection - enum - format - 20 - enum - pub_date_t - enum - druid - enum - manuscript_facet - enum - - true - subject - true - true - false - 5 + + + edismax + explicit + + score desc, pub_date_sort desc, title_sort asc + 20 + *:* + 6<-1 6<90% + 1 + 0 + 0.01 + false + + all_search + AND + + + title_exact_search^1000 body_chars_exact_search^1000 + title_unstem_search^500 body_chars_unstem_search^500 + title_search^75 body_chars_search^75 + subtitle_unstem_search^75 + subtitle_search^75 + title_alternate_unstem_search^50 + title_alternate_search^20 + title_other_search^20 + title_other_unstem_search^20 + + personal_authors_unstem_search^25 + personal_authors_search^20 + corporate_authors_unstem_search^20 + corporate_authors_search^10 + authors_all_unstem_search^10 + authors_all_search^5 + + topic_unstem_search^50 + topic_search^20 + geographic_unstem_search^20 + geographic_search^15 + era_unstem_search^15 + era_search^10 + subject_other_unstem_search^10 + subject_other_search^5 + subject_all_unstem_search^5 + subject_all_search^2 + + manuscript_unstem_search^5 + manuscript_search^2 + abstract_unstem_search^5 + abstract_search^2 + + pub_date^2 + id + collection_search + all_unstem_search^5 + all_search + + + title_exact_search^5000 body_chars_exact_search^5000 + title_unstem_search^2500 body_chars_unstem_search^2500 + title_search^375 body_chars_search^375 + subtitle_unstem_search^375 + subtitle_search^250 + title_alternate_unstem_search^250 + title_alternate_search^100 + title_other_unstem_search^100 + title_other_search^75 + + personal_authors_unstem_search^125 + personal_authors_search^100 + corporate_authors_unstem_search^100 + corporate_authors_search^50 + authors_all_unstem_search^50 + authors_all_search^25 + + topic_unstem_search^250 + topic_search^150 + geographic_unstem_search^150 + geographic_search^100 + era_unstem_search^100 + era_search^50 + subject_other_unstem_search^50 + subject_other_search^25 + subject_all_unstem_search^25 + subject_all_search^10 + + manuscript_unstem_search^25 + manuscript_search^10 + abstract_unstem_search^25 + abstract_search^10 + + pub_date^10 + collection_search^5 + all_unstem_search^25 + all_search^5 + + + title_search^1500 body_chars_search^1500 + subtitle_search^225 + title_alternate_search^150 + title_other_search^60 + + personal_authors_search^75 + corporate_authors_search^60 + authors_all_search^30 + + topic_search^150 + geographic_search^60 + era_search^50 + subject_other_search^30 + subject_all_search^15 + + manuscript_search^7.5 + abstract_search^7.5 + collection_search^3 + all_search^3 + + + title_search^1000 body_chars_search^1000 + subtitle_search^150 + title_alternate_search^100 + title_other_search^40 + + personal_authors_search^50 + corporate_authors_search^40 + authors_all_search^20 + + topic_search^100 + geographic_search^40 + era_search^30 + subject_other_search^20 + subject_all_search^10 + + manuscript_search^5 + abstract_search^5 + collection_search^2 + all_search^2 + + true + 1 + 21 + genre_facet + enum + type_of_resource_facet + personal_authors_facet + corporate_authors_facet + authors_all_facet + physical_description_form_facet + physical_description_media_type_facet + physical_location_display + language + enum + folio + enum + topic_facet + geographic_facet + era_facet + subject_all_facet + format + model + collection + enum + format + 20 + enum + pub_date_t + enum + druid + enum + manuscript_facet + enum + + + score, + id, + abstract_display, + access_condition_display, + type_of_resource_display, + personal_authors_display, + corporate_authors_display, + authors_all_display, + title_display, + subtitle_display, + title_alternate_display, + title_other_display, + language, + physical_description_extent_display, + physical_description_form_display, + physical_description_media_type_display, + physical_location_display, + relateditem_title_display, + pub_date_display, + topic_display, + geographic_display, + era_display, + subject_other_display, + subject_all_display, + format, + model, + url_sfx, + manifest_urls, + collection, + druid, + img_info, + target_url, + target_type, + body_url, + body_type, + body_chars_display, + manuscript_display, + folio + + + + model:Annotation + + + + + + edismax + explicit + + score desc, pub_date_sort desc, title_sort asc + 20 + *:* + 6<-1 6<90% + 1 + 0 + 0.01 + false + + all_search + AND + + + title_exact_search^1000 body_chars_exact_search^1000 + title_unstem_search^500 body_chars_unstem_search^500 + title_search^75 body_chars_search^75 + subtitle_unstem_search^75 + subtitle_search^75 + title_alternate_unstem_search^50 + title_alternate_search^20 + title_other_search^20 + title_other_unstem_search^20 + + personal_authors_unstem_search^25 + personal_authors_search^20 + corporate_authors_unstem_search^20 + corporate_authors_search^10 + authors_all_unstem_search^10 + authors_all_search^5 + + topic_unstem_search^50 + topic_search^20 + geographic_unstem_search^20 + geographic_search^15 + era_unstem_search^15 + era_search^10 + subject_other_unstem_search^10 + subject_other_search^5 + subject_all_unstem_search^5 + subject_all_search^2 + + manuscript_unstem_search^5 + manuscript_search^2 + abstract_unstem_search^5 + abstract_search^2 + + pub_date^2 + id + collection_search + all_unstem_search^5 + all_search + + + title_exact_search^5000 body_chars_exact_search^5000 + title_unstem_search^2500 body_chars_unstem_search^2500 + title_search^375 body_chars_search^375 + subtitle_unstem_search^375 + subtitle_search^250 + title_alternate_unstem_search^250 + title_alternate_search^100 + title_other_unstem_search^100 + title_other_search^75 + + personal_authors_unstem_search^125 + personal_authors_search^100 + corporate_authors_unstem_search^100 + corporate_authors_search^50 + authors_all_unstem_search^50 + authors_all_search^25 + + topic_unstem_search^250 + topic_search^150 + geographic_unstem_search^150 + geographic_search^100 + era_unstem_search^100 + era_search^50 + subject_other_unstem_search^50 + subject_other_search^25 + subject_all_unstem_search^25 + subject_all_search^10 + + manuscript_unstem_search^25 + manuscript_search^10 + abstract_unstem_search^25 + abstract_search^10 + + pub_date^10 + collection_search^5 + all_unstem_search^25 + all_search^5 + + + title_search^1500 body_chars_search^1500 + subtitle_search^225 + title_alternate_search^150 + title_other_search^60 + + personal_authors_search^75 + corporate_authors_search^60 + authors_all_search^30 + + topic_search^150 + geographic_search^60 + era_search^50 + subject_other_search^30 + subject_all_search^15 + + manuscript_search^7.5 + abstract_search^7.5 + collection_search^3 + all_search^3 + + + title_search^1000 body_chars_search^1000 + subtitle_search^150 + title_alternate_search^100 + title_other_search^40 + + personal_authors_search^50 + corporate_authors_search^40 + authors_all_search^20 + + topic_search^100 + geographic_search^40 + era_search^30 + subject_other_search^20 + subject_all_search^10 + + manuscript_search^5 + abstract_search^5 + collection_search^2 + all_search^2 + + true + 1 + 21 + genre_facet + enum + type_of_resource_facet + personal_authors_facet + corporate_authors_facet + authors_all_facet + physical_description_form_facet + physical_description_media_type_facet + physical_location_display + language + enum + folio + enum + topic_facet + geographic_facet + era_facet + subject_all_facet + format + model + collection + enum + format + 20 + enum + pub_date_t + enum + druid + enum + manuscript_facet + enum + + + score, + id, + abstract_display, + access_condition_display, + type_of_resource_display, + personal_authors_display, + corporate_authors_display, + authors_all_display, + title_display, + subtitle_display, + title_alternate_display, + title_other_display, + language, + physical_description_extent_display, + physical_description_form_display, + physical_description_media_type_display, + physical_location_display, + relateditem_title_display, + pub_date_display, + topic_display, + geographic_display, + era_display, + subject_other_display, + subject_all_display, + format, + model, + url_sfx, + manifest_urls, + collection, + druid, + img_info, + target_url, + target_type, + body_url, + body_type, + body_chars_display, + manuscript_display, + folio + + + + model:Transcription - - spellcheck -