CenterForDigitalHumanities / rerum_server

Java web service for a RERUM compliant digital object repository
http://rerum.io
Other
7 stars 2 forks source link

@ids on annotationStoreDev got borked #204

Closed cubap closed 3 years ago

cubap commented 3 years ago

The @id of things in the annotationStoreDev database had 26k records with the "img01-v1" path in the @id for some reason.

cubap commented 3 years ago
db.alpha.updateMany(
  { '@id': { $regex: /img01-v1/ } },
  [{
    $set: { '@id': {
      $replaceOne: { input: "$@id", find: "img01-v1", replacement: "v1" }
    }}
  }]
)
cubap commented 3 years ago

This command was run twice (minor adjustments) to clean up the @id field. It was quick to queue and cleared in about 5 seconds.