-
Notifications
You must be signed in to change notification settings - Fork 20
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
Consider adding a "Write-Only" Adapter #598
Comments
Maybe we could approach this in the same way we do RDF predicate mappings. |
@awead Can you expand on what you mean? |
@tpendragon I was thinking of architectural consistency. We can inject different kinds of mechanisms to map properties to RDF predicates. Perhaps we can use the same technique for indexing? It's similar: mapping properties to one or more solr fields. |
Some discussions from tonight: Is an indexer just a "write only" persister? What's the difference between an indexer and any sort of transformation logic from the hash that is a |
I like the idea of an indexer abstraction in Valkyrie. My thoughts on this... Having an abstraction allows Hyrax to write its indexers compliant with the Valkyrie indexer abstraction. Then Hyrax can be delivered out of the box with the Solr indexer and allow sites to switch to using an elastic search indexer just by changing the registration. Something like...
Additional benefits of moving away from a fully functioning metadata adapter...
|
@tpendragon I see there hasn't been much movement on this. Are there plans to move this forward? |
@elrayle Sorry, yes. We intend to do this, but it needs some research into the best interface. It looks like y'alls work on Wings is going to be a good smoke test on how useful the abstraction will be. |
Thoughts and updates from initial progress on this in Hyrax / Wings. I wrote an indexing adapter that registers the same way other adapters do. I started working on a solr indexing adapter, hoping to re-use valkyrie code directly. Initially it looked like I may be able to use the solr metadata adapter repository, but that didn't pan out because:
I am essentially pulling code out of valkyrie and simplifying it a bunch instead of actually reusing anything. Figuring out how the indexing behavior itself should work, I stripped out some logic that seems too opinionated, e.g. places where all the values are indexed by default -- these should probably be extracted into a proper indexer that you can configure to use or not use. https://github.com/samvera/valkyrie/blob/master/lib/valkyrie/persistence/solr/model_converter.rb#L63 |
In working on the indexer concept in Hyrax, a difference between active fedora's @tpendragon commented: I'm not sure how I feel about mutating the hash, but there's actually a ticket in Valkyrie that proposes yielding the context: #599... Is it important to be able to mutate the actual hash? @no-reply ? |
Assuming that the Hyrax indexing config is roughly the same as Figgy (https://github.com/pulibrary/figgy/blob/master/config/initializers/valkyrie.rb#L224-L238), couldn't an implementation remove the indexing class they didn't want from Hyrax's config somehow? |
I've become convinced that the Decoupling it entirely from the model seems good. We've done that in Hyrax with a factory method |
Right now we index via a full MetadataAdapter, but it leads to bloat in the index and may result in strange inconsistencies between what you want for pulling out a Valkyrie object and what you want for search and display.
An Indexer would probably just have a pattern for building one up, some sane defaults,
save_all
, anddelete_all
.When developing the indexer's API, think of it as a write-only MetadataAdapter. This will make it easy for downstream users to transition.
The text was updated successfully, but these errors were encountered: