Home > Back-end >  ES server dynamic index of new data=strict mode optimization for help
ES server dynamic index of new data=strict mode optimization for help

Time:05-01

You know es inside a automatically the mappings is a time when you add the index data es the bottom for you automatically for the index set up mapping..

This is not good as I have a data type on the business requirements we still need to manually set the mappings

I checked the es is provides three models so I him with the most stringent practical attached below

For example, I create a new index appointed strict mode
 {
"The mappings" : {
"Posts" : {
"Dynamic" : "strict",
"Properties" : {
"Name" : {
"Type" : "keyword"
},
"Age" : {
"Type" : "integer"
}
}
}
}
}




The normal new json
 {
"Name" : "SDSDSD,"
"Age" : 10
}


more than I expected effect of the new
 {
"Name" : "more than I expected effect of the new"
}



view the data


 {
"Took" : 0,
"Timed_out" : false,
"_shards" : {
"Total" : 5,
"Successful" : 5,
"Failed" : 0
},
"Hits" : {
"Total" : 3,
"Max_score" : 1.0,
"Hits" : [
{
"_index" : "test_mappings,"
"_type" : "posts,"
"_id" : "AXkiM287p36gCRi_oiia,"
"_score" : 1.0,
"_source" : {
"Name" : "SDSDSD,"
"Age" : 10
}
},
{
"_index" : "test_mappings,"
"_type" : "posts,"
"_id" : "AXkiNOlcp36gCRi_oiib,"
"_score" : 1.0,
"_source" : {
"Name" : "more than I expected effect of the new"
}
},
{
"_index" : "test_mappings,"
"_type" : "posts,"
"_id" : "AXkiM0FDp36gCRi_oiiZ,"
"_score" : 1.0,
"_source" : {
"Name" : "SDSDSD
"}
}
]
}
}


this very detail does not conform to the he cannot control must finish all insert? I haven't he also succeeded, the age, will my application side to control it, and what a great god help see
Isn't me less what configuration?
  • Related