diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index bd7c75080..b6c8faf74 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -82,6 +82,7 @@ def self.uploaded_field config.http_method = :post ## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params + # Max fragsize is needed to not cut off full text search at default 51,000 characters config.default_solr_params = { qt: "search", rows: 10, @@ -93,7 +94,8 @@ def self.uploaded_field "hl.simple.pre": "", "hl.simple.post": "", "hl.snippets": 30, - "hl.fragsize": 100 + "hl.fragsize": 100, + "hl.maxAnalyzedChars": 5_100_000 } # Specify which field to use in the tag cloud on the homepage. diff --git a/app/helpers/shared_search_helper.rb b/app/helpers/shared_search_helper.rb index 4f3dc5d92..303c52289 100644 --- a/app/helpers/shared_search_helper.rb +++ b/app/helpers/shared_search_helper.rb @@ -63,11 +63,10 @@ def build_url(id, request_params, account_cname, base_route_name) # @param params [Hash] the query parameters, which may include search queries # @return [String] the URL with appended query parameters, if applicable def append_query_params(url, model, params) - return url if params[:q].blank? if params[:q].present? && model.any_highlighting_in_all_text_fields? "#{url}?parent_query=#{params[:q]}&highlight=true" else - "#{url}?q=#{params[:q]}" + url end end diff --git a/app/views/catalog/_index_list_default.html.erb b/app/views/catalog/_index_list_default.html.erb index dd935e223..03359fd09 100644 --- a/app/views/catalog/_index_list_default.html.erb +++ b/app/views/catalog/_index_list_default.html.erb @@ -11,7 +11,7 @@ <% if should_render_index_field?(document, field) && field_value.present? %>