Skip to content

Commit

Permalink
Use new-style request handler configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Jul 17, 2024
1 parent 5e48a2c commit 1bc56ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
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
4 changes: 1 addition & 3 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
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

0 comments on commit 1bc56ac

Please sign in to comment.