<commit_before>#!/bin/sh -

HOST=`etcdctl ls --recursive /services/elasticsearch \
  | grep transport \
  | head -n 1 \
  | xargs etcdctl get \
  | sed -e 's/{"host":"\([^"]*\)","port":\([^"]*\)}/\1\:9200/'`

# Delete ElasticSearch index
if [ $? -eq 0 ] && [ -n "${HOST}" ]; then
  curl -XDELETE "http://${HOST}/${SERVICE_ID}"
else
  echo "Unable to correctly clean ES"
  exit 1
fi<commit_msg>NXIO-375: Also ensure SERVICE_ID is not empty<commit_after>#!/bin/sh -

HOST=`etcdctl ls --recursive /services/elasticsearch \
  | grep transport \
  | head -n 1 \
  | xargs etcdctl get \
  | sed -e 's/{"host":"\([^"]*\)","port":\([^"]*\)}/\1\:9200/'`

# Delete ElasticSearch index
if [ $? -eq 0 ] && [ -n "${HOST}" ] && [ -n ${SERVICE_ID} ]; then
  curl -XDELETE "http://${HOST}/${SERVICE_ID}"
else
  echo "Unable to correctly clean ES"
  exit 1
fi
{'fraction_non_alphanumeric': 0.23515439429928742, 'fraction_numerical': 0.022565320665083134, 'mean_word_length': 3.0528846153846154, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '115402', 'n_tokens_mistral': 347, 'n_tokens_neox': 323, 'n_words': 83}