Skip to content

Commit

Permalink
Makes the Solr field for ALTO XML a text field. (#2268)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwatson78 authored May 30, 2024
1 parent 3792d91 commit 6090249
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/indexers/curate/file_set_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def preservation_event_value(preservation_event)
end

def full_text_fields(solr_doc)
solr_doc['alto_xml_ssi'] = object.alto_xml if object.alto_xml.present?
solr_doc['alto_xml_tesi'] = object.alto_xml if object.alto_xml.present?
solr_doc['transcript_text_tesi'] = object.transcript_text if object.transcript_text.present?
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/indexers/curate/file_set_indexer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
end

# rubocop:disable RSpec/MessageChain
describe 'alto_xml_ssi' do
describe 'alto_xml_tesi' do
before do
allow(file_set).to receive(:extracted).and_call_original
allow(file_set).to receive_message_chain(:extracted, :file_name, :first, :include?).and_return(true)
end

it 'returns the expected text' do
expect(indexer['alto_xml_ssi']).to include(
expect(indexer['alto_xml_tesi']).to include(
'String ID="P10_S00002" HPOS="538" VPOS="3223" WIDTH="112" HEIGHT="1005" ' \
'STYLEREFS="StyleId-0" CONTENT="incorporation" WC="0.4776923" CC="5723770778406"'
)
Expand Down

0 comments on commit 6090249

Please sign in to comment.