-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add thumbnail and representative ids and paths to valkyrie solr indexers #5524
Conversation
…Resource This happens when creating a Monograph without Valkyrie indexing enabled. Fixes monograph deposit feature spec.
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.
Basically looks good. @tpendragon do you want to review before this is merged?
def to_solr | ||
{ | ||
"id": resource.id.to_s, | ||
"date_uploaded_dtsi": resource.created_at, | ||
"date_modified_dtsi": resource.updated_at, | ||
"has_model_ssim": resource.internal_resource | ||
} | ||
}.with_indifferent_access |
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.
This will make life easier.
@@ -0,0 +1,31 @@ | |||
# frozen_string_literal: true | |||
module Hyrax | |||
module ThumbnailIndexer |
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.
Nice abstraction. This will help with consistency and keeping the code DRY.
# Which FileSet file to use for mime type resolution | ||
# @ see Hyrax::FileSetTypeService | ||
attr_writer :characterization_proxy | ||
def characterization_proxy |
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 to have this as a configuration
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.
Looks good.
Fixes #4788 (shows the default thumbnail until derivative creation is done)
Adds indexing for thumbnails and representative objects to valkyrie solr index.
Other changes:
services/indexes_thumbnails.rb
toindexers/hyrax/thumbnail_indexer.rb