Skip to content

Instantly share code, notes, and snippets.

@clintongormley
Created February 23, 2011 10:18
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/840245 to your computer and use it in GitHub Desktop.
Save clintongormley/840245 to your computer and use it in GitHub Desktop.
Put mapping on multiple indices
# [Wed Feb 23 11:17:05 2011] Protocol: http, Server: 127.0.0.1:9200
curl -XPUT 'http://127.0.0.1:9200/foo/' -d '
{}
'
# [Wed Feb 23 11:17:05 2011] Response:
# {
# "ok" : true,
# "acknowledged" : true
# }
# [Wed Feb 23 11:17:10 2011] Protocol: http, Server: 127.0.0.1:9200
curl -XPUT 'http://127.0.0.1:9200/bar/' -d '
{}
'
# [Wed Feb 23 11:17:10 2011] Response:
# {
# "ok" : true,
# "acknowledged" : true
# }
# [Wed Feb 23 11:17:13 2011] Protocol: http, Server: 127.0.0.1:9200
curl -XPUT 'http://127.0.0.1:9200/foo,bar/baz/_mapping' -d '
{
"baz" : {
"properties" : {
"text" : {
"type" : "string"
}
}
}
}
'
# [Wed Feb 23 11:17:23 2011] Response:
# {
# "ok" : true,
# "acknowledged" : false
# }
# [Wed Feb 23 11:17:55 2011] Protocol: http, Server: 127.0.0.1:9200
curl -XGET 'http://127.0.0.1:9200/foo,bar/_mapping'
# [Wed Feb 23 11:17:55 2011] Response:
# {
# "bar" : {
# "baz" : {
# "properties" : {
# "text" : {
# "type" : "string"
# }
# }
# }
# },
# "foo" : {
# "baz" : {
# "properties" : {
# "text" : {
# "type" : "string"
# }
# }
# }
# }
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment