ES
Everglow101
这个作者很懒,什么都没留下…
展开
-
java 创建 ES 中 父子文档
//注入client@Autowired RestHighLevelClient client = new RestHighLevelClient( RestClient.builder(new HttpHost("localhost",9200,"http")));//创建索引public void createFCIndex() throws IOException { Settings.Builder settings = Settings.builder(); settin.原创 2022-01-04 17:42:49 · 1299 阅读 · 0 评论 -
ES使用Bulk批量添加数据报The number of object passed must be even but was [1]
7.5.1版本使用Bulk批量添加数据报The number of object passed must be even but was [1],本人报错原因:使用的source方法中的参数顺序不一样,如上图, 所以判定的对象长度为1应该用的source方法的参数是1.source 2.XContentType后解决...原创 2021-12-28 17:43:32 · 1108 阅读 · 0 评论 -
term查询
term分词的时候,先使用toLowerCase()转化为小写,后分词,所以 遇到同时有大小写,如Bob时,找不到,只找到bob原创 2021-12-21 14:48:20 · 90 阅读 · 0 评论 -
java 与ES...逻辑
大致为.1.获取RestHighLevelClient client ,对象client2.准备request3通过client连接es 获得response RestClient+SearchSourceBuilder使用时1.获取RestHighLevelClient client ,对象client2.创建并设置SearchSourceBuilder对象 new SearchSourceBuilder()3.设置本次查询显示的设置,from,size,ti...原创 2021-12-17 10:44:21 · 527 阅读 · 0 评论 -
es父子条件查询语句
DELETE my_blogs# 设定 Parent/Child MappingPUT my_blogs{ "settings": { "number_of_shards": 2 }, "mappings": { "properties": { "blog_comments_relation": { "type": "join", "relations": { "blog": "comment"...原创 2021-12-10 10:34:57 · 1326 阅读 · 0 评论 -
ES设置date_detection的时候报Root mapping definition has unsupported paramete
删除"type",直接写date_detectioncurl -XPUT "http://localhost:9200/my_index" -H 'Content-Type: application/json' -d'{"mappings": {"date_detection": false}}'或PUT /my_index{"mappings": {"date_detection": false}}原创 2021-12-02 16:46:04 · 470 阅读 · 0 评论 -
ES “No handler for type [string] declared on field [title]
现在使用ES版本为7.5.1到了6.X就彻底移除string了。另外,"index"的值只能是boolean变量了。当type为string时String改为text原创 2021-12-02 10:27:25 · 2271 阅读 · 0 评论 -
es使用sort的时候No mapping found for [dates] in order to sort on
sort的时候 强制指定 sort 字段类型原创 2021-12-01 16:20:54 · 2416 阅读 · 0 评论 -
ES在范围操作符
原创 2021-12-01 15:11:58 · 851 阅读 · 0 评论 -
es服务器启动后自动关闭
除了看看配置文件中的jvm.options在内存大小,还有看看.yml文件在有没有配置的数据不合法原创 2021-12-01 10:19:22 · 1921 阅读 · 0 评论 -
ES中聚合查询
ES中聚合查询原创 2021-11-30 14:21:41 · 278 阅读 · 0 评论