Skip to content

Instantly share code, notes, and snippets.

@imotov
Last active December 31, 2015 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imotov/a3792c0f1094c71dd079 to your computer and use it in GitHub Desktop.
Save imotov/a3792c0f1094c71dd079 to your computer and use it in GitHub Desktop.
curl -XPUT localhost:9200/_cluster/settings -d '{"transient" : {"indices.fielddata.cache.breaker.overhead" : 1.03}}'
curl -XDELETE "localhost:9200/test-idx?pretty"
curl -XPUT "localhost:9200/test-idx?pretty" -d '{
"settings": {
"number_of_replicas": 0,
"number_of_shards": 1
},
"mappings": {
"doc": {
"properties": {
"foo": {"type": "string", "index": "not_analyzed"}
}
}
}
}'
curl -XPOST "localhost:9200/test-idx/doc?pretty&refresh" -d '{"foo": "A"}'
curl -XPOST "localhost:9200/test-idx/doc?pretty&refresh" -d '{"foo": "B"}'
curl -XPOST "localhost:9200/test-idx/doc?pretty&refresh" -d '{"foo": "B"}'
curl -XPOST "localhost:9200/test-idx/doc?pretty&refresh" -d '{"foo": "C"}'
curl -XPOST "localhost:9200/test-idx/doc?pretty&refresh" -d '{"foo": "D"}'
curl -XPOST "localhost:9200/test-idx/doc?pretty&refresh" -d '{"foo": "E"}'
curl -XGET "localhost:9200/test-idx/doc/_search?pretty&sort=foo:asc"
curl -XDELETE "localhost:9200/test-idx?pretty"
curl -s -XGET "localhost:9200/_nodes/stats?pretty&all" | grep -A 6 "fielddata_breaker"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment