Key points of knowledge
1 , understanding the data types of the ES core
2 , understand ES default mapping way
3 , view Mapping
1 , the core data type
- string ,text Span style= "Font-family:dejavu Sans Mono" >
- byte
- short integer long float double
- boolean
- date
2 , Dynamic Mapping
This is ES comes with (the default mapping mode), which is mapping by default in cases where the programmer is not specified.
True or false--and Boolean
123--long
123.45--Double
2017-01-01--Date
"Hello World"--string/text
3 , view Mapping
Syntax: Get/index/_mapping/type
Example: Get/test_index/_mapping/test_type
The results are as follows
{
"Test_index": {
"Mappings": {
"Test_type": {
"Properties": {
"Test_field": {
"Type": "Text",
"Fields": {
"keyword": {
"Type": "Keyword",
"Ignore_above": 256
}
}
},
"Test_field1": {
"Type": "Text",
"Fields": {
"keyword": {
"Type": "Keyword",
"Ignore_above": 256
}
}
},
"Test_field2": {
"Type": "Text",
"Fields": {
"keyword": {
"Type": "Keyword",
"Ignore_above": 256
}
}
}
}
}
}
}
}
Data structure under 44.mapping