Dynamic Mapping中,对于Dynamic属性的说明:
// NULL and index:false
PUT users
{
"mappings": {
"properties": {
"firstName":{
"type": "text"
},
"loatName":{
"tpye":"text"
},
"email":{
"type": "keyword",
"null_value": "NULL"
},
"mobile":{
"type": "text",
"index": false
}
}
}
}
PUT products
{
"mappings": {
"properties": {
"commpany":{
"type": "text",
"fields": {
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"comment":{
"type": "text",
"fields": {
"english_comment":{
"type":"text",
"analyzer":"english",
"search_analyzer":"english"
}
}
}
}
}
}
//copy 不会在source中;
PUT users
{
"mappings": {
"properties": {
"firstName":{
"type": "text",
"copy_to": "fullName"
},
"loatName":{
"tpye":"text",
"copy_to": "fullName"
},
"mobile":{
"type": "keyword",
"null_value": "NULL"
}
}
}
}