Created
April 14, 2014 10:50
-
-
Save radu-gheorghe/10637236 to your computer and use it in GitHub Desktop.
deleted stats are not updated when running delete by query in Elasticsearch 1.1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo | |
echo '===========================' | |
echo 'Creating an empty index' | |
echo '===========================' | |
curl -XDELETE localhost:9200/test | |
curl -XPOST localhost:9200/test/ -d '{"settings": {"index.number_of_shards": 1}}' | |
echo | |
echo '===========================' | |
echo 'Index a document and delete it by ID' | |
echo '===========================' | |
curl localhost:9200/test/test/1 -d '{"foo":"bar"}' | |
curl -XDELETE localhost:9200/test/test/1 | |
echo | |
echo '===========================' | |
echo 'Stats are updated' | |
echo '===========================' | |
curl -s 'http://localhost:9200/_stats?indexing=true&pretty' | grep 'delete_' | head -3 | |
echo | |
echo '===========================' | |
echo 'Index a document and delete it by query' | |
echo '===========================' | |
curl localhost:9200/test/test/1 -d '{"foo":"bar"}' | |
curl -XDELETE localhost:9200/test/_query?q=*:* | |
echo | |
echo '===========================' | |
echo 'BUG! Stats are NOT updated' | |
echo '===========================' | |
curl -s 'http://localhost:9200/_stats?indexing=true&pretty' | grep 'delete_' | head -3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment