美文网首页
elasticsearch-rest-high-level-cl

elasticsearch-rest-high-level-cl

作者: lomo萌神 | 来源:发表于2019-11-22 16:52 被阅读0次

一、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. 高亮查询

相关文章

网友评论

      本文标题:elasticsearch-rest-high-level-cl

      本文链接:https://www.haomeiwen.com/subject/naajectx.html