Skip to content

Commit

Permalink
use fastVector for highlighting text
Browse files Browse the repository at this point in the history
  • Loading branch information
rococodogs committed Oct 9, 2019
1 parent 8db4987 commit 7c60014
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ class CatalogController < ApplicationController
qt: 'search',
rows: 10,
qf: 'title_tesim description_tesim creator_tesim keyword_tesim extracted_text_tsimv',
'hl.snippets': 5,

'hl.simple.pre': '<strong>',
'hl.simple.post': '</strong>'
'hl.tag.pre': '<strong>',
'hl.simple.post': '</strong>',
'hl.tag.post': '</strong>',
'hl.method': 'fastVector',
'hl.snippets': 5
}

# solr field configuration for document/show views
Expand Down Expand Up @@ -231,7 +235,7 @@ class CatalogController < ApplicationController
}
end

config.add_search_field('full_text', label: :'blacklight.search.fields.subject') do |field|
config.add_search_field('full_text', label: :'blacklight.search.fields.full_text') do |field|
field.solr_parameters = {
qf: 'extracted_text_tsimv',
pf: 'extracted_text_tsimv'
Expand Down
1 change: 1 addition & 0 deletions config/locales/blacklight.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ en:
years_encompassed: Year

all_fields: All fields
full_text: Full Text

0 comments on commit 7c60014

Please sign in to comment.