Skip to content
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

Merged
merged 6 commits into from
Mar 15, 2022

Conversation

dlpierce
Copy link
Contributor

Fixes #4788 (shows the default thumbnail until derivative creation is done)

Adds indexing for thumbnails and representative objects to valkyrie solr index.

Other changes:

  • Copies and adapts to valkyrie the old services/indexes_thumbnails.rb to indexers/hyrax/thumbnail_indexer.rb
  • Aligns the existing collection thumbnail_path_ss indexing with that of works and filesets.
  • Makes the output of ValkyrieIndexer#to_solr a HashWithIndifferentAccess. The existing output already has a mix of strings and symbols which complicates testing. This should affect all its subclasses.
  • ValkyrieIngestJob now has an optional pcdm_use argument to allow thumbnails and other types of files to be ingested.
  • Make FileSet.characterization_proxy configurable at the application level
  • When determining which type of presenter to use, detect AF FileSets within Resources. This was needed to pass specs, but maybe can be removed later?

Copy link
Contributor

@elrayle elrayle left a 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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor

@elrayle elrayle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@elrayle elrayle merged commit 80c6cf9 into main Mar 15, 2022
@elrayle elrayle deleted the thumbnail_representative_ids branch March 15, 2022 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hyrax::Works do not show thumbnail in Dashboard -> Works
3 participants