Created
June 29, 2012 03:45
-
-
Save anonymous/3015553 to your computer and use it in GitHub Desktop.
Loading 10K items, faceting them, checking cache usage
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
curl -XPUT 'http://localhost:9200/products/product/_mapping?pretty=true' -d'{ | |
"product": { | |
"properties": { | |
"year": { "type": "long" } | |
} | |
} | |
}' | |
for i in {1..10000} | |
do | |
curl -XPOST "http://localhost:9200/products/product/$i?pretty=true" -d "{ | |
"year": $i, | |
"b": false | |
}" | |
done | |
curl -XPOST 'http://localhost:9200/products/_refresh?pretty=true' | |
curl -XPOST http://localhost:9200/products/product/_search -d '{"facets": { "year": {"statistical":{"field":"year"}}}}' | |
curl -s http://localhost:9200/_cluster/nodes/stats?pretty=1|grep cache --after 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment