view scripts/search/solr-delete-id @ 14:be7787c36e58 default tip

new: nofity LGSercies for deleted files
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 02 Nov 2015 16:41:23 +0100
parents a50cf11e5178
children
line wrap: on
line source

#!/bin/bash
if [ -z "$1" ]; then
  echo "No Solr ID provided."
  exit 1
else
  echo "Deleting Solr id $1"
  OUTPUT=`curl -s http://localhost:8983/solr/update/json?commit=true -H "Content-type: application/json" -X POST -d "{\"delete\": { \"query\":\"id:$1\"}}"`
  # exit code 7 is expected when Solr is down
  EXIT_CODE=$?
  #echo $EXIT_CODE
  #echo $OUTPUT
fi