ElasticSearch分词检索

  1. 倒排索引:表示一种数据结构,分词词条与文档id集合的隐射关系

  2. 它跟关系型数据库是一种互补的关系,因为关系型数据库支持事务操作,满足ACID原则

  3. 索引库的文档字段只允许新增不允许修改

java 复制代码
1.创建索引库
put /索引库名称

2.1 查询索引库
get /索引库名称

2.2 批量查询
get /索引库名称/_search

3.新增字段
put /索引库名称/_mapping

4.删除索引库
put /索引库名称
javascript 复制代码
1. 插入文档
post /索引库名称/_doc/文档id

2.查询文档
get /索引库名称/_doc/文档id

3.1 全量修改文档 (会先删除旧文档)
put /索引库名称/_doc/文档id

3.2 局部修改文档
put /索引库名称/_update/文档id

4.删除文档
delete /索引库名称/_doc/文档id
javascript 复制代码
#ik分词器下载 https://github.com/infinilabs/analysis-ik/releases
POST /_analyze
{
  "analyzer": "ik_smart",
  "text": "java是热门的编程语言,在web开发有举足轻重的地位"
}


# "ik_max_word" 模式分词的结果更多
POST /_analyze
{
  "analyzer": "ik_max_word",
  "text": "java是热门的编程语言,在web开发有举足轻重的地位"
}

修改ik分词器配置文件IKAnalyzer.cfg.xml,拓展网络热词

  1. 高级客户端的操作索引库(图片来源黑马公开课)
  1. 高级客户端操作文档

(二)DSL 按条件查询

(三) 计算得分

人为定义得分计算

相关推荐
ly76895 分钟前
倒排索引与 FST 在 Lucene 中的内存布局:segment、docValues 与词典压缩的工程取舍
elasticsearch·lucene·倒排索引·doc values·fst
Elasticsearch2 小时前
利用预计算上下文,更快速、更低成本地开展支持问题调查
elasticsearch
小小小米粒5 小时前
重置本地git
大数据·git·elasticsearch
ly76895 小时前
Spring Boot 集成 Elasticsearch 的生产实践:客户端选型、索引生命周期与批量写入容错
spring boot·elasticsearch·索引生命周期·java api client·批量写入
Elasticsearch9 小时前
认识 Elastic® nightshift AI SRE,你的全天候 SRE 同事
elasticsearch
Elasticsearch10 小时前
我们如何构建 Context Engine,将 agent 的 token 使用量降低 71%
elasticsearch
鱼宵10 小时前
Spring AI 生产化改造:记忆落 Redis、向量落 ES,重启再也不丢
人工智能·redis·spring·elasticsearch·springai
骑士雄师11 小时前
rag的具体案例:通过es在意图识别的时候进行个命中。
大数据·elasticsearch·搜索引擎
vx_Biye_Design13 小时前
flask学生课程笔记共享系统29026-计算机课程设计、毕业设计
java·javascript·spring boot·后端·elasticsearch·flask·课程设计
Elastic 中国社区官方博客13 小时前
AWS 自动化根因分析:从 CloudWatch 告警到完成故障诊断,仅需 36 秒
大数据·运维·elasticsearch·自动化·aws