Skip to content

Instantly share code, notes, and snippets.

@clintongormley
Created July 15, 2010 15:44
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 clintongormley/477132 to your computer and use it in GitHub Desktop.
Save clintongormley/477132 to your computer and use it in GitHub Desktop.
curl -XPUT 'http://127.0.0.1:9201/es_test_1/' -d '
{}
'
# {
# "ok" : true,
# "acknowledged" : true
# }
curl -XGET 'http://127.0.0.1:9201/_cluster/health?timeout=30s&wait_for_status=green'
# {
# "active_primary_shards" : 10,
# "timed_out" : false,
# "relocating_shards" : 0,
# "active_shards" : 20,
# "status" : "green"
# }
curl -XPUT 'http://127.0.0.1:9201/es_test_1/test/_mapping' -d '
{
"properties" : {
"num" : {
"type" : "integer"
},
"text" : {
"type" : "string"
}
}
}
'
# {
# "ok" : true,
# "acknowledged" : true
# }
curl -XGET 'http://127.0.0.1:9200/es_test_1/test/_mapping'
# {
# "es_test_1" : {
# "test" : {
# "_id" : {
# "store" : "no"
# },
# "dynamic" : true,
# "path" : "full",
# "date_formats" : [
# "dateOptionalTime",
# "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd"
# ],
# "_boost" : {
# "name" : "_boost"
# },
# "properties" : {
# "num" : {
# "store" : "no",
# "precision_step" : 4,
# "boost" : 1,
# "omit_term_freq_and_positions" : true,
# "omit_norms" : true,
# "index_name" : "num",
# "index" : "not_analyzed",
# "type" : "integer",
# "term_vector" : "no"
# },
# "text" : {
# "store" : "no",
# "boost" : 1,
# "omit_term_freq_and_positions" : false,
# "omit_norms" : false,
# "index_name" : "text",
# "index" : "analyzed",
# "type" : "string",
# "term_vector" : "no"
# }
# },
# "_source" : {
# "name" : "_source",
# "enabled" : true
# },
# "_all" : {
# "store" : "no",
# "term_vector" : "no",
# "enabled" : true
# },
# "type" : "object",
# "enabled" : true
# }
# }
# }
curl -XGET 'http://127.0.0.1:9201/es_test_1/test/_mapping'
# {
# "error" : "RemoteTransportException[[Iron Man][inet[/127.0.0.1
# > :9300]][/cluster/state]]; nested: "
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment