Module: IiifPrint::HighlightSearchParams
- Included in:
- CatalogSearchBuilder
- Defined in:
- app/search_builders/concerns/iiif_print/highlight_search_params.rb
Overview
add highlighting on stored full text field if this is a keyword search can be added to default_processor_chain in a SearchBuilder class
Instance Method Summary collapse
-
#highlight_search_params(solr_parameters = {}) ⇒ Object
add highlights on full text field, if there is a keyword query.
Instance Method Details
#highlight_search_params(solr_parameters = {}) ⇒ Object
add highlights on full text field, if there is a keyword query
6 7 8 9 10 11 12 13 |
# File 'app/search_builders/concerns/iiif_print/highlight_search_params.rb', line 6 def highlight_search_params(solr_parameters = {}) return unless solr_parameters[:q] || solr_parameters[:all_fields] solr_parameters[:hl] = true solr_parameters[:'hl.fl'] = '*' solr_parameters[:'hl.fragsize'] = 100 solr_parameters[:'hl.snippets'] = 5 solr_parameters[:'hl.requiredFieldMatch'] = true end |