<commit_before>#!/bin/bash
COLLECTION_ID=$1
[[ "$COLLECTION_ID" == '' ]] && echo "USAGE $0 COLLECTION_ID" && exit 1
set -x
psql whelk -c "delete from lddb where manifest->>'collection' = '$COLLECTION_ID';"
curl -XDELETE "http://localhost:9200/whelk/$COLLECTION_ID/_query" -d '{"query":{"match_all": {}}}'<commit_msg>Provide whelk as argument to nuke-collection.sh<commit_after>#!/bin/bash
WHELK_ID=$1
COLLECTION_ID=$2
[[ "$COLLECTION_ID" == '' ]] && echo "USAGE $0 WHELK_ID COLLECTION_ID" && exit 1
set -x
psql $WHELK_ID -c "delete from lddb where manifest->>'collection' = '$COLLECTION_ID';"
curl -XDELETE "http://localhost:9200/$WHELK_ID/$COLLECTION_ID/_query" -d '{"query":{"match_all": {}}}'
{'fraction_non_alphanumeric': 0.2014388489208633, 'fraction_numerical': 0.02158273381294964, 'mean_word_length': 6.1020408163265305, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '239542', 'n_tokens_mistral': 290, 'n_tokens_neox': 270, 'n_words': 57}