Sha256: 534a8dc90212b6ff3103ce37ef0fd900f1da83cc269fe006e24110559a6352d2
Contents?: true
Size: 620 Bytes
Versions: 1
Compression:
Stored size: 620 Bytes
Contents
# Meant to be applied on top of Blacklight helpers module BlacklightHighlight::SolrHelperExtension def self.included some_class some_class.solr_search_params_logic += [:solr_highlight_params] end def solr_highlight_params solr_parameters, user_parameters if solr_parameters['q'] || solr_parameters['hl.q'] || solr_parameters[:q] || solr_parameters[:'hl.q'] solr_parameters[:hl] ||= true solr_parameters[:'hl.fl'] ||= '' solr_parameters[:'hl.fl'] += blacklight_config.index_fields.select { |key, config| config.highlight }.map { |key, config| config.field }.join(",") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blacklight_highlight-0.1.0 | lib/blacklight_highlight/solr_helper_extension.rb |