Skip to content

Instantly share code, notes, and snippets.

@outoftime
Created March 8, 2012 15:38
Show Gist options
  • Save outoftime/2001546 to your computer and use it in GitHub Desktop.
Save outoftime/2001546 to your computer and use it in GitHub Desktop.
Reduction for error on _analyze endpoint when routed to a specific index
pkill -f $(pwd)
for i in {0..2}
do
bin/elasticsearch
done
echo -n "waiting for cluster to come up"
until curl -s localhost:9200/_cluster/health?wait_for_status=green > /dev/null
do
echo -n '.'
sleep 1
done
echo ''
curl -XDELETE localhost:9200?pretty=true
echo ''
curl -XPUT localhost:9200/test?pretty=true -d '{"index":{"number_of_shards":1}}'
echo ''
sleep 5
for i in {0..2}
do
curl "localhost:920$i/test/_analyze?pretty=true&text=test"
echo ''
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment