Elasticsearch 入门 索引、分词器

term, match_phrase, match查询

参考 ElasticSearch match, match_phrase, term的区别

  • term是对输入不分词,进行全文索引查询。存储时是否启用分词器,会影响查询效果
  • match_phase对输入分词,但要求查询时将每个term都搜到,且顺序一致。
  • match是对输入分词,只要文档包含了查询的一部分条件,都可以被返回。

其它规则
Elasticsearch 查询之term,match,match_phrase

索引构建 text keyword vector

elasticsearch设置字段不索引,或源数据只索引不存储。设置后即可。

 "index": false

保存文档

1.elasticsearch文档存储(保存|修改|删除)

保存文档时,路径参数可以带上ID,或不带ID。数据参数是JSON格式。


Put localhost:9200/customer/external/2
 
{
  "name":"zhangsan2"
}

refresh机制

https://blog.csdn.net/qq_34168515/article/details/108869052

猜你喜欢

转载自blog.csdn.net/duoyasong5907/article/details/133064703