Skip to content

Instantly share code, notes, and snippets.

@Omega359
Last active August 29, 2015 14:02
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 Omega359/0c2a93690b4db30693a1 to your computer and use it in GitHub Desktop.
Save Omega359/0c2a93690b4db30693a1 to your computer and use it in GitHub Desktop.
curl -XPUT http://localhost:9200/777 -d ' {
"mappings": {
"TASK": {
"_all": {
"enabled": false
},
"_id": {
"path": "vid__v"
},
"properties": {
"completed": {
"type": "boolean",
"store": true,
"fields": {
"fortesting" : {
"type": "string",
"store": false
},
"plain": {
"type": "boolean",
"store": true
}
}
},
"completed_at": {
"type": "date",
"store": true,
"fields": {
"plain": {
"type": "date",
"store": true,
"format": "dateOptionalTime"
}
}
}
}
}
}
}'
curl -XGET http://localhost:9200/777/_mapping?pretty
{
"777" : {
"mappings" : {
"TASK" : {
"_all" : {
"enabled" : false
},
"_id" : {
"path" : "vid__v"
},
"properties" : {
"completed" : {
"type" : "boolean",
"store" : true
},
"completed_at" : {
"type" : "date",
"store" : true,
"fields" : {
"plain" : {
"type" : "date",
"store" : true,
"format" : "dateOptionalTime"
}
},
"format" : "dateOptionalTime"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment