Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
./elasticdump --delete --input=http://ELASTICSEARCH_LOADBALANCER_HOSTNAME:9200/dpla_alias --output=/path/to/deleted-records/p16373coll60.json --searchBody '{"query":{"term":{"sourceResource.collection.title":"p16373coll60"}}}'

From the triplestore

A method remains to be devised to delete the records deleted above from the triplestore. The method documented below should not be attempted, as it will result in 409 Conflict errors in the future if the records are reharvested.

You need to have executed the command above, giving yourself a JSON file that contains record IDs.  With that, you can run the following command to delete records from your triplestore, where "ldp.dp.la" needs to resolve to your Marmotta server. You will probably want to have that defined in your /etc/hosts file.

Code Block
languagebash
# DO NOT DO THIS ...
 
cd /path/to/deleted-records  # See above.  Note that you could have multiple files for multiple sets.
 
cat * | jq -r '.[] | "http://ldp.dp.la/ldp/items/" + ._id, ._source.originalRecord' | xargs -L 20 -I = curl -s -o /dev/null -w "%{http_code} =\n" -X DELETE =