全文搜索,拆分,分词--获得id,获取部分数据装载进去,简化版数据,用一种状态展示出来,点击详情走的是数据库查询查看显示详情
倒排索引(特征),创建文档,使用文档--加速查询
下载Elasticsearch 7.16.2 | Elastic
打开,目录E:\soft\elasticsearch-7.16.2\bin中的elasticsearch.bat文件,双击即可,首次打开较慢,时间还行,里面两个端口,9300与9200,9200是对外访问端口,启动成功,直接浏览器访问http://localhost:9200/即可
IK分词器Releases · medcl/elasticsearch-analysis-ik · GitHub
下载好的ik分词器东西放置在这里E:\soft\elasticsearch-7.16.2\plugins\ik,重启
http://localhost:9200/books Body raw JSON
{
"mappings":{
"properties":{
"id":{
"type":"keyword"//关键字
},
"name":{
"type":"text",//文本
"analyzer":"ik_max_word",//分词器
"copy_to":"all"//拷贝到虚拟字段all中
},
"type":{
"type":"keyword"//关键字
},
"description":{
"type":"text",//文本
"analyzer":"ik_max_word",//分词器
"copy_to":"all"//拷贝到虚拟字段all中
},
"all":{
"type":"text",
"analyzer":"ik_max_word"
}
}
}
}