Skip to content

Commit

Permalink
Removing advanced search from Find It, closes #153, closes #106, closes
Browse files Browse the repository at this point in the history
#91, closes #90, closes #19, closes #13
  • Loading branch information
LBCC Library committed Apr 7, 2017
1 parent 3c3e58c commit 7648854
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 44 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@ end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'warbler'

gem 'blacklight', '~> 6.6'
gem 'blacklight', '~> 6.8'

gem 'rsolr', '~> 1.1.2'
gem 'devise', '~> 4.2'
gem 'devise-guests', '~> 0.5'
gem 'blacklight-marc', '~> 6.1'

gem "blacklight_advanced_search", '~> 6.0.2'
gem "blacklight_range_limit", "6.0.0"
gem "bibtex-ruby"
gem "citeproc-ruby"
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// about supported directives.
//
//= require jquery
//= require 'blacklight_advanced_search'
//= require ahoy
//= require jquery_ujs
//= require turbolinks
Expand Down
3 changes: 0 additions & 3 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
*= require_tree .
*= require_self
*= require 'blacklight_advanced_search'
*
* Used by blacklight_range_limit
*= require 'blacklight_range_limit'
Expand Down
27 changes: 0 additions & 27 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class CatalogController < ApplicationController
require('known_item_search_classifier')

include BlacklightRangeLimit::ControllerOverride
include BlacklightAdvancedSearch::Controller
include Rails.application.routes.url_helpers

include Blacklight::Catalog
Expand All @@ -21,21 +20,6 @@ class CatalogController < ApplicationController
end

configure_blacklight do |config|
# default advanced config values
config.advanced_search ||= Blacklight::OpenStructWithHashAccess.new
# config.advanced_search[:qt] ||= 'advanced'
config.advanced_search[:url_key] ||= 'advanced'
config.advanced_search[:query_parser] ||= 'dismax'
config.advanced_search[:form_solr_parameters] ||= {}

config.advanced_search = {
:form_solr_parameters => {
"facet.field" => ['is_electronic_facet', 'format', 'language_facet', 'subject_topic_facet', 'subject_geo_facet'],
"facet.sort" => "index" # sort by byte order of values
}
}



## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
config.default_solr_params = {
Expand Down Expand Up @@ -101,17 +85,6 @@ class CatalogController < ApplicationController
config.add_facet_field 'series_facet', :label => 'Series', :limit => true, :sort => 'count'
config.add_facet_field 'record_source_facet', :label => 'Source database', :limit => true

=begin
config.advanced_search = {
:form_solr_parameters => {
'facet.field' => ['is_electronic_facet', 'format', 'language_facet', 'subject_topic_facet', 'subject_geo_facet', 'subject_name_facet', 'record_source_facet'],
'facet.limit' => 10,
'facet.sort' => 'index' # sort by byte order of values
}
}
=end


# Have BL send all facet field names to Solr, which has been the default
# previously. Simply remove these lines if you'd rather use Solr request
# handler defaults, or have no facets.
Expand Down
6 changes: 0 additions & 6 deletions app/controllers/saved_searches_controller.rb

This file was deleted.

3 changes: 1 addition & 2 deletions app/models/search_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ class SearchBuilder < Blacklight::SearchBuilder
include Blacklight::Solr::SearchBuilderBehavior
include BlacklightRangeLimit::RangeLimitBuilder

include BlacklightAdvancedSearch::AdvancedSearchBuilder
self.default_processor_chain += [:add_advanced_parse_q_to_solr, :add_advanced_search_to_solr]
end

2 changes: 0 additions & 2 deletions app/views/shared/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
<ul class="nav navbar-right col-offset-6">
<li>
<%= link_to("New search", root_path, class: 'col-xs-4 bookmarks_nav', style: "min-width:130px;") %>
<%= link_to("Search options", blacklight_advanced_search_engine.advanced_search_path, class: 'col-xs-4 bookmarks_nav', style: "min-width:130px;") %>
<!--blacklight_advanced_search_engine.advanced_search_path(params.except(:controller, :action)), class: 'advanced_search-->
</li> <li>
<%= link_to("About Find It", "about", class: 'col-xs-4 bookmarks_nav', style: "min-width:130px;") %>
</li>
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

concern :range_searchable, BlacklightRangeLimit::Routes::RangeSearchable.new
mount Blacklight::Engine => '/'
mount BlacklightAdvancedSearch::Engine => '/'

Blacklight::Marc.add_routes(self)
root to: "catalog#index"
Expand Down

0 comments on commit 7648854

Please sign in to comment.