Skip to content

Commit

Permalink
Add date_new_ssi Solr filed
Browse files Browse the repository at this point in the history
The field contains copy of date_tesim. The change is required as *_tesim is not sortable field in Solr.

"msg":"can not sort on multivalued field: date_tesim of type: text_en"

This is part of change introduced with https://dti-uoy.atlassian.net/browse/TNW-30 bug fixes.
  • Loading branch information
paluchas committed Jun 20, 2021
1 parent 860ab14 commit 1ea1641
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/new_solr_fields_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def modify_sdoc(sdoc)

sdoc['date_facet_ssim'] = date_facet

# Store SingleDate in single Solr dynamic field e.g. *_ssi (Note *_dttsi requieres dates in ISO format)
# Downcase occassional dates with comments
sdoc['date_new_ssi'] = sdoc['date_tesim'][0].downcase unless sdoc['date_tesim'].blank?

# add the register name and folio label to the entries
register_new,folio_new = get_entry_register_array(sdoc['folio_ssim'])
sdoc['entry_register_facet_ssim'] = register_new
Expand Down

0 comments on commit 1ea1641

Please sign in to comment.