dynamic(动态设置)
curl -XPUT 'localhost:9200/my_index/my_type/1?pretty' -H 'Content-Type: application/json' -d' # 1
{
"username": "johnsmith",
"name": {
"first": "John",
"last": "Smith"
}
}
'
curl -XGET 'localhost:9200/my_index/_mapping?pretty' # 2
curl -XPUT 'localhost:9200/my_index/my_type/2?pretty' -H 'Content-Type: application/json' -d' # 3
{
"username": "marywhite",
"email": "mary@white.com",
"name": {
"first": "Mary",
"middle": "Alice",
"last": "White"
}
}
'
curl -XGET 'localhost:9200/my_index/_mapping?pretty' # 4Last updated