当然es的安装我就不详细的写了,百度一大堆,本人现在用的是6.2.3 的版本。
1.安装es后我们开始创建索引和mapping;
--put http://localhost:9200/local_mst_student_idx_1
local_mst_student_idx_1:代表索引名。
mappings:
{
"mappings":{
"mst_student":{
"properties":{
"id":{
"type":"long",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"stu_code":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"stu_name":{