elasticsearch-rest-high-level-client 7.3.0增删改查基本操作API

一、elasticsearch-rest-high-level-client 创建索引3中方式

https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.3/java-rest-high-document-index.html#java-rest-high-document-index






https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.3/java-rest-high-document-index.html#java-rest-high-document-index

一些常用查询
1. match query VS match_phrase query

注意其差别:

match query:会对查询语句进行分词,分词后查询语句中的任何一个词项被匹配,文档就会被搜索到。如果想查询匹配所有关键词的文档,可以用and操作符(term即是and, or则是should)连接;

match_phrase query:满足下面两个条件才会被搜索到

(1)分词后所有词项都要出现在该字段中

(2)字段中的词项顺序要一致

如下:


2. 高亮查询

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容