Skip to content

Instantly share code, notes, and snippets.

@jamieparkinson
Created October 7, 2020 13:55
Show Gist options
  • Save jamieparkinson/f49e97c673af1604d7de8052cbd7edc3 to your computer and use it in GitHub Desktop.
Save jamieparkinson/f49e97c673af1604d7de8052cbd7edc3 to your computer and use it in GitHub Desktop.
Ingest/merger versioning

Desired behaviour for ingest versioning

Works

Given a work already in the index:

  • The same work with a higher transformer version always overrides it
  • The same work with the same transformer version and more sources merged in overrides it
  • The same work with the same transformer version which have been unlinked from some/all sources overrides it
  • The same work with the same transformer version which has been redirected overrides it

Images

Given an image already in the index:

  • The same image with a higher transformer version always overrides it
  • The same image with the same transformer version but a higher transformer version of any source always overrides it
  • The same image with the same transformer version and the same transformer version of all sources, but where any of the sources have more sources merged in, overrides it
  • The same image with the same transformer version and a new redirected source overrides it

All but the first point are really just applying the works rules to the works in image.source, but:

  1. This can't be done "literally" as the image source works are just work data and do not contain the work state directly
  2. The image.source can contain 2 works (canonical and redirected) - but perhaps we can just apply the rules to the canonical work as this will (?) contain the information about redirects?
@jamieparkinson
Copy link
Author

I think you're right, yes. Do you think that's possible to do within the matcher store (since it already exists)?

@alicefuzier
Copy link

Uhm don't think so.. the matcher doesn't know if something gets merged and it also doesn't keep a history. It keeps the current state of the graph but it doesn't keep a record of how it changed, so it doesn't know how many versions of a work have been emitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment