Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new-style request handler configuration. #4334

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions app/controllers/bookmarks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ class BookmarksController < CatalogController
include Blacklight::Bookmarks
include SelectionsCount

configure_blacklight do |config|
config.default_solr_params = {
qt: 'document',
rows: 20
}
end

# Overidden from Blacklight to add our tabbed interface
def index
@bookmarks = token_or_current_or_guest_user.bookmarks.where(record_type: 'catalog')
Expand Down
5 changes: 1 addition & 4 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class CatalogController < ApplicationController

## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
config.default_solr_params = {
qt: 'search',
rows: 20,
"f.callnum_facet_hsim.facet.limit": "-1",
"f.stanford_work_facet_hsim.facet.limit": "-1"
Expand All @@ -85,9 +84,8 @@ class CatalogController < ApplicationController
## Default parameters to send on single-document requests to Solr. These settings are the Blackligt defaults (see SolrHelper#solr_doc_params) or
## parameters included in the Blacklight-jetty document requestHandler.
#
config.document_solr_path = 'select'
config.document_solr_path = 'document'
config.default_document_solr_params = {
:qt => 'document',
# ## These are hard-coded in the blacklight 'document' requestHandler
# # :fl => '*',
# # :rows => 1
Expand Down Expand Up @@ -484,7 +482,6 @@ class CatalogController < ApplicationController
config.view.brief(partials: [:index], icon_class: "fa-align-justify")

config.index.respond_to.mobile = true
config.fetch_many_document_params = { qt: 'document' }

config.add_show_tools_partial :citation, if: false
config.add_show_tools_partial :sms, if: false, callback: :sms_action, validator: :validate_sms_params
Expand Down
4 changes: 2 additions & 2 deletions config/solr_configs/solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
of SearchComponents (see below) and supports distributed
queries across multiple shards
-->
<requestHandler name="search" class="solr.SearchHandler" default="true">
<requestHandler name="/select" class="solr.SearchHandler">
<lst name="defaults">
<str name="defType">edismax</str>
<str name="echoParams">explicit</str>
Expand Down Expand Up @@ -1049,7 +1049,7 @@
</requestHandler>

<!-- single document requests; use id=666 instead of q=id:666 -->
<requestHandler name="document" class="solr.SearchHandler" >
<requestHandler name="/document" class="solr.SearchHandler" >
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="fl">
Expand Down
Loading