Skip to content

Commit

Permalink
Copy add_teim field to text field (Additional Descriptive Data)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkostin1966 committed Oct 9, 2024
1 parent 11a0bd5 commit d8d1e13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/dul_arclight/traject/ead2_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,6 @@
to_field "add_tesim", extract_xpath("/ead/archdesc/descgrp[@type = 'add']", to_text: false)
to_field "add_teim", extract_xpath("/ead/archdesc/descgrp[@type = 'add']")

# to_field "para_tesim", extract_xpath("/ead/archdesc/descgrp/p", to_text: false)
# to_field "para_teim", extract_xpath("/ead/archdesc/descgrp/p")
#
# to_field "index_tesim", extract_xpath("/ead/archdesc/index|/ead/archdesc/descgrp/index", to_text: false)
# to_field "index_teim", extract_xpath("/ead/archdesc/index|/ead/archdesc/descgrp/index")

DID_SEARCHABLE_NOTES_FIELDS.map do |selector|
to_field "#{selector}_tesim", extract_xpath("/ead/archdesc/did/#{selector}", to_text: false)
to_field "#{selector}_teim", extract_xpath("/ead/archdesc/did/#{selector}/*[local-name()!='head']")
Expand Down Expand Up @@ -994,6 +988,10 @@
to_field "#{selector}_heading_ssm", extract_xpath("./#{selector}/head")
to_field "#{selector}_teim", extract_xpath("./#{selector}/*[local-name()!='head']")
end

to_field "add_tesim", extract_xpath("./descgrp[@type = 'add']", to_text: false)
to_field "add_teim", extract_xpath("./descgrp[@type = 'add']")

DID_SEARCHABLE_NOTES_FIELDS.map do |selector|
to_field "#{selector}_tesim", extract_xpath("./did/#{selector}", to_text: false)
to_field "#{selector}_teim", extract_xpath("./did/#{selector}/*[local-name()!='head']")
Expand Down
4 changes: 4 additions & 0 deletions solr/arclight/conf/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@
<copyField source="scopecontent_teim" dest="text" />
<copyField source="separatedmaterial_teim" dest="text" />
<copyField source="userestrict_teim" dest="text" />

<!-- grab Additional Descriptive Data section - <descgrp type="add"> -->
<copyField source="add_teim" dest="text" />

<!-- grab structured data that's important -->
<copyField source="unitid_ssm" dest="text" />
<copyField source="unitid_ssm" dest="unitid_identifier_match" />
Expand Down

0 comments on commit d8d1e13

Please sign in to comment.