Skip to content

Instantly share code, notes, and snippets.

@kimchy
Created August 24, 2011 22:38
Show Gist options
  • Save kimchy/1169474 to your computer and use it in GitHub Desktop.
Save kimchy/1169474 to your computer and use it in GitHub Desktop.
curl -X POST "http://localhost:9200/users_test" -d '{
"mappings" : {
"user": {
"dynamic_templates":[{
"long": {
"match_mapping_type":"long",
"match":"*",
"mapping":{
"type":"long",
"include_in_all":false
}
}
}],
"properties" : {
"birthdate":{"null_value":-62167392000,"type":"long"}
}
}
}
}'
curl -XPUT localhost:9200/users_test/user/1 -d '{
"birthdate" : 1
}'
curl localhost:9200/users_test/user/_mapping?pretty=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment