-
Notifications
You must be signed in to change notification settings - Fork 0
Use 250 additional metadata #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6c7869c
3f3ddf6
da83c3d
5c724aa
289b53e
1d8eb2d
2564dce
849a498
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,10 @@ class TimdexSearch < TimdexBase | |
| hits | ||
| records { | ||
| timdexRecordId | ||
| identifiers { | ||
| kind | ||
| value | ||
| } | ||
| title | ||
| source | ||
| contentType | ||
|
|
@@ -61,6 +65,10 @@ class TimdexSearch < TimdexBase | |
| dates { | ||
| kind | ||
| value | ||
| range { | ||
| gte | ||
| lte | ||
| } | ||
| } | ||
| links { | ||
| kind | ||
|
|
@@ -84,6 +92,11 @@ class TimdexSearch < TimdexBase | |
| } | ||
| sourceLink | ||
| summary | ||
| subjects { | ||
| kind | ||
| value | ||
| } | ||
| citation | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking question about the citation field specifically: Adding the citation field here, and the update to the citation method in the Timdex normalizer, don't seem to be paired with any relevant change to the timdex result partial - we're only adding a comment there that things aren't ready to display yet? (It feels like the method in the normalizer was never called, if the query never populated the field) I agree with the comment you've added that citations in timdex need more work to be useful in this way, so I'm treating the changes in this work as part of that, but wanted to state my reading here in case I've missed a change in the UI logic.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are correct. I initially implemented the citation in the timdex partial but the data is so wonky in the citation I took it out of the view. I left it in the query intact so it will be easier to show people the weird data in the near future without having to rebuild cassettes. |
||
| } | ||
| aggregations { | ||
| accessToFiles { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,19 +10,44 @@ | |
|
|
||
| <p class="pub-info"> | ||
| <span><%= result[:content_type]&.each { |type| type['value'] }&.join(' ; ') %></span> | ||
| <span> | ||
| <% result[:dates]&.each do |date| %> | ||
| <%= date['value'] if date['kind'] == 'Publication date' %> | ||
| <% end %> | ||
| </span> | ||
|
|
||
| <% if result[:date_range].present? %> | ||
| <span><%= result[:date_range] %></span> | ||
| <% else %> | ||
| <span> | ||
| <% result[:dates]&.each do |date| %> | ||
| <%= date['value'] if date['kind'] == 'Publication date' %> | ||
| <% end %> | ||
| </span> | ||
| <% end %> | ||
| </p> | ||
|
|
||
| <%# unclear why TIMDEX is using contributors and Primo is using creators. Should we normalize this? %> | ||
| <% if result[:contributors].present? %> | ||
| <span class="sr">Contributors: </span> | ||
| <ul class="list-inline truncate-list contributors"> | ||
| <%= render partial: 'shared/contributors', locals: { contributors: result[:contributors] } %> | ||
| </ul> | ||
| <% end %> | ||
|
|
||
| <%# Primo displays citation here. TIMDEX citations probably need work to be useful here %> | ||
|
|
||
| <% if result[:subjects].present? %> | ||
| <div class="result-subjects truncate-list"> | ||
| <span class="sr">Subjects: </span> | ||
| <ul> | ||
| <% result[:subjects].each do |subject| %> | ||
| <li><%= subject %></li> | ||
| <% end %> | ||
| </ul> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <% if result[:summary].present? %> | ||
| <div class="result-summary truncate-list"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking concern: I see that we're using a
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GeoData needs to be completely reworked once we stabilize USE. I think consistency within the USE partials is the main focus right now, and yeah I'm letting Dave determine ultimate markup. |
||
| <span class="sr">Summary: </span><%= result[:summary] %> | ||
| </div> | ||
| <% end %> | ||
| </div> | ||
|
|
||
| <div class="result-highlights use"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ | |
| <span><%= result[:year] %></span> | ||
| </p> | ||
|
|
||
| <%# unclear why TIMDEX is using contributors and Primo is using creators. Should we normalize this? %> | ||
| <% if result[:creators].present? %> | ||
| <span class="sr">Contributors: </span> | ||
| <ul class="list-inline truncate-list contributors"> | ||
|
|
@@ -32,6 +33,28 @@ | |
| </ul> | ||
| <% end %> | ||
|
|
||
| <% if result[:citation].present? %> | ||
| <div class="result-container"> | ||
| <span>In: </span><%= result[:citation] %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <% if result[:subjects].present? %> | ||
| <div class="result-subjects truncate-list"> | ||
| <span class="sr">Subjects: </span> | ||
| <ul> | ||
| <% result[:subjects].each do |subject| %> | ||
| <li><%= subject %></li> | ||
| <% end %> | ||
| </ul> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <% if result[:summary].present? %> | ||
| <div class="result-summary truncate-list"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same non-blocking concern here as for the timdex result partial above, about whether the markup should be uniform between timdex / primo / geo partials. |
||
| <span class="sr">Summary: </span><%= result[:summary] %> | ||
| </div> | ||
| <% end %> | ||
| </div> | ||
|
|
||
| <div class="result-get"> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little concerned that this block will miss valid date ranges that may be in the data. The scenario is:
relevant_datesgets populated with multiple creation / publication entriesIt feels like a more robust approach would be to do all the filtering prior to the first return clause, something like
.select { |date| $w[creation publication.include?(date['kind']) && date['range'].present? }?To be clear, I haven't looked at whether this condition exists in Timdex records - if dates are all either ranges or not-ranges, then this concern may be irrelevant and what you've written here is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. This logic was ported from Bento but Bento only ever dealt with ASpace records so it is likely we need to revisit the logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated using general idea you proposed and added a test to confirm behavior.