Skip to content

Commit

Permalink
Merge pull request #5564 from samvera/system_date_indexing
Browse files Browse the repository at this point in the history
Index create/modified date with same field as in ActiveFedora-based models
  • Loading branch information
cjcolvar authored Mar 22, 2022
2 parents 8208fa7 + b186ad7 commit e3ed472
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/indexers/hyrax/valkyrie_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def to_solr
"id": resource.id.to_s,
"date_uploaded_dtsi": resource.created_at,
"date_modified_dtsi": resource.updated_at,
"system_create_dtsi": resource.created_at,
"system_modified_dtsi": resource.updated_at,
"has_model_ssim": resource.internal_resource
}.with_indifferent_access
end
Expand Down
4 changes: 3 additions & 1 deletion spec/indexers/hyrax/valkyrie_indexer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
expect(indexer.to_solr).to match a_hash_including(
id: resource.id.to_s,
date_uploaded_dtsi: resource.created_at,
date_modified_dtsi: resource.updated_at
date_modified_dtsi: resource.updated_at,
system_create_dtsi: resource.created_at,
system_modified_dtsi: resource.updated_at
)
end
end
Expand Down

0 comments on commit e3ed472

Please sign in to comment.