Created
June 29, 2012 15:22
-
-
Save cldellow/3018581 to your computer and use it in GitHub Desktop.
Load 10K items of type product, 100K items of type othertype, memory usage to facet the first type grows 10x
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/othertype/_mapping?pretty=true' -d'{ | |
"othertype": { | |
"properties": { | |
"year": { "type": "long" }, | |
"b": { "type": "boolean" } | |
} | |
} | |
}' | |
curl -XPUT 'http://localhost:9200/products/product/_mapping?pretty=true' -d'{ | |
"product": { | |
"properties": { | |
"year": { "type": "long" }, | |
"b": { "type": "boolean" } | |
} | |
} | |
}' | |
for i in {1..10000} | |
do | |
curl -XPOST "http://localhost:9200/products/product/$i?pretty=true" -d "{ | |
"year": [$i], | |
"b": false | |
}" | |
done | |
for i in {1..100000} | |
do | |
curl -XPOST "http://localhost:9200/products/othertype/$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