INDEX_ROOT="lawsoc"
#INDEX_DATE="2015-10-06"
INDEX_DATE=$(date +%Y-%m-%d)
INDEX_NAME="${INDEX_ROOT}_${INDEX_DATE}"
DETAIL_NAME="office_detail"
HOST='localhost'
PORT='9200'

WORKSPACE="/var/tmp/lawsoc_new/json_out/"
ITEM="office/"
for file in "${WORKSPACE}${ITEM}"/*; do
	echo "${WORKSPACE}${ITEM}${file}"
	curl -H "Content-type:application/json" --data @"${WORKSPACE}${ITEM}${file}" http://"${HOST}:${PORT}/${INDEX_NAME}/${DETAIL_NAME}"
done
