7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/celsius/primo/soap_api/searcher/search_brief/search_result_transformation/process_records.rb', line 7
def call
add_records!(transformation.target).each do |record|
[
{ "_source/control/recordid" => "_id" },
{ "_source/display/creator" => "creator" },
{ "_source/display/creationdate" => "created" },
{ "_source/display/description" => "description" },
{ "_source/display/edition" => "edition" },
{ "_source/display/format" => "format" },
{ "_source/control/ilsapiid" => "identifier" },
{ "_source/control/recordid" => "identifier" },
{ "_source/search/isbn" => "isbn" },
{ "_source/search/issn" => "issn" },
{ "_source/display/language" => "language" },
{ "_source/display/title" => "title" },
{ "_source/display/publisher" => "publisher" },
{ "_source/display/subject" => "subject" }
].each do |mapping|
source = resolve_path(record, mapping.keys.first)
target = resolve_path(record, mapping.values.first, -2)
target_key = mapping.values.first.split("/").last
Celsius::Hash.smart_store(target, target_key, deep_clone(source))
end
add_place_of_publication!(record)
end
end
|